[poppler] test/perf-test.cc
Krzysztof Kowalczyk
kjk at kemper.freedesktop.org
Mon Sep 24 21:09:07 PDT 2007
test/perf-test.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
diff-tree bde8c9669ca6b43cb6a664bd14df164a718041ea (from bf9b46b012c64624818a2110af7c4b7e3b419728)
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date: Mon Sep 24 21:08:58 2007 -0700
Con't copy the file unless COPY_FILE is defined.
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 068d2a0..fe02a74 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -22,6 +22,12 @@
#include <windows.h>
#endif
+// Define COPY_FILE if you want the file to be copied to a local disk first
+// before it's tested. This is desired if a file is on a slow drive.
+// Currently copying only works on Windows.
+// Not enabled by default.
+//#define COPY_FILE 1
+
#include <assert.h>
#include <config.h>
#include <stdio.h>
@@ -862,10 +868,13 @@ static void RenderPdf(const char *fileNa
const char *fileNameSplash = NULL;
PdfEnginePoppler * engineSplash = NULL;
+#ifdef COPY_FILE
// TODO: fails if file already exists and has read-only attribute
CopyFile(fileName, POPPLER_TMP_NAME, false);
fileNameSplash = POPPLER_TMP_NAME;
-
+#else
+ fileNameSplash = fileName;
+#endif
LogInfo("started: %s\n", fileName);
engineSplash = new PdfEnginePoppler();
More information about the poppler
mailing list