Faster PDF display from search results

Hi,

I’ve a lot of big PDFs with about 240 pages and 12 MB file size. When I click on a PDF in DevonThink Pro 2.0pb3 it takes a lot of time (5 Seconds or more) until the page with the corresponding result will be shown. DevonThink seems to hang until the PDF is prepared. Is there a way to speed this up? Spotlight with Preview is much faster but also not as fast as it could be.

Maybe you could implement a caching so that displaying the same PDF some minutes late it will be faster.

Performance in such a situation will depend largely on the amount of free RAM that’s available at the time the PDF is selected, and to a much less degree on the speed of the CPU.

I selected a PDF that has 505 pages. The first page is displayed in less than a second. I then selected a text string that occurs on page 5 of that document, then selected it from the search results. It took almost 2 seconds to open that document and scroll down to the first occurrence of the text string.

Some PDFs take longer than others to open. I’ve got one PDF that is a table with almost four thousand rows. It takes about 7 seconds to open and display the first page.

The results noted above took place with almost half of my 4 GB RAM available as free physical RAM. Cacheing does take place.

But I can force slow performance by opening a number of databases concurrently and performing some memory-intensive operations. At some point, I’ll run out of free physical RAM and Virtual Memory will take over. Operations will slow down, because data must be swapped back and forth between RAM and disk. Reads and writes to disk are orders of magnitude slower than reads and writes to RAM.

When that happens, quitting and relaunching DEVONthink can speed things up again. A restart will give me a clean slate once more.

Incidentally, someone on macosxhints posted a related hint to improve the display speed in Preview. Since we use essentially the same code, maybe this will help you as well.

Speed up PDF viewing in Preview

The files are protected so only printing to a new pdf does work. But it won’t speed up the display in DevonThink. In Preview it’s much faster to display the page. But I realized that if the option “group by page” is enabled for the search then Preview is slow like DevonThink.

Do you use the grouping? What about an option to disable ist. Grouping in Preview will show me a progress bar while indexing the pdf. Couldn’t the index be stored in the DevonThink database? Directly clicking a pdf will open the pdf instantly in DevonThink only open the pdf from the search results will be slow. So why don’t store just the page number of the first highlight and jump to the page when clicking the search result instead of relying on OS X slow feature?

Well, if the delay can’t be fixed, what about using threads for displaying the pdf? It’s quite annoying when DT is always busy so I can’t scroll to the results if I accidently click a pdf.

I too find some of these search/highlight delays quite extreme. Would it make sense to:

  • only compute highlights for the visible page(s) i.e. lazily
  • (perhaps as an option) return the search results as a document list without trying to scroll to / show and highlight the word matches, and have separate user action to initiate the highlighting

I find myself being quite cautious with some searches because of the delays.

Thanks.