Menu

#192 Sometimes after saving a PDF, the page selection UI becomes sluggish/unresponsive

v1.0_(example)
closed-fixed
None
5
2020-03-15
2015-03-14
No

Sometimes after scanning a bunch of pages and saving a PDF file, I want to select everything in the page selector and hit delete so I can scan another document.

After saving a PDF though, sometimes the page selector becomes very sluggish. It takes multiple seconds to change the selection (either selecting a different page or selecting all pages), and it is similarly sluggish to delete the selection. The sluggishness seems to go away once the pages are deleted.

When the page selector is in the nonresponsive state, the entire UI is blocked (including the scan dialog). It seems the main thread is doing some processing on the page data on selection. Perhaps this processing should be moved to a different thread (or removed, if it's not doing anything useful).

Host: Linux Mint 17.1 "Rebecca"
gscan2pdf version: 1.3.0-0~ppa1 (installed from the official gscan2pdf PPA located at https://launchpad.net/~jeffreyratcliffe/+archive/ubuntu/ppa)

Discussion

  • Jeffrey Ratcliffe

    I suspect that this has to do with the OCR output. If you have a large number of words in the output, then it takes a while to update the OCR buffer. Can you test with and without the OCR output to confirm?

     
  • Stephen Kent

    Stephen Kent - 2015-03-14

    I believe your diagnosis is accurate.

    I just scanned a 49-page document. Some pages are full of text, some have a moderate amount of text, and a small number of pages are blank.

    I did NOT run the OCR automatically as the pages were scanned, I scanned with no post-processing options to get the document into gscan2pdf. I could select each page normally in the page selector. I then started OCR on all pages. As the pages were processing, I noticed the selection sluggishness appeared for pages that OCR had completed, while not yet processed pages could still be selected normally. Once OCR was complete, the selection sluggishness was back for nearly every page, except the pages that are blank. Pages with less text seem to have less of a selection delay.

    Perhaps a good solution would be to delay OCR loading until the user clicks the "OCR Output" tab for a particular page (or otherwise uses the data, such as when saving the document), and/or move that processing to a different thread instead of the main UI thread.

     
  • Stephen Kent

    Stephen Kent - 2017-04-23

    This issue is still present in gscan2pdf 1.5.4, and reduces the usability of the app. Is there any chance it could be fixed?

     
  • Jeffrey Ratcliffe

    In the last couple of releases, I've made the responsiveness with OCR output much better. Has this fixed things for you?

     
  • Stephen Kent

    Stephen Kent - 2020-03-14

    I've updated to the newest version. I scanned and OCR'd a multipage document and the UI is much more responsive now when OCR data is present. Thanks!

     
  • Jeffrey Ratcliffe

    Thanks for the feedback

     
  • Jeffrey Ratcliffe

    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB