Simple Scan only uses one core when saving PNG-s

Bug #1173815 reported by Thomas Martin Klein
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Simple Scan
Triaged
Wishlist
soliloque

Bug Description

After scaning 18 color pages, i selected save to PNG, and i realize that Simple Scan only uses one core to do all the processing.
This might be appropriate for PDF saving, but saving PNGs is parallelizable. So you might consider using two or more cores simultaneously each saving one image. If the reason for not using multiple threads is that you want to avoid hogging the system you might consider changing the process priorities instead.

Things that are to be considered:
- check available memory. (Simple scan already scans into ram, so it is quite possible to get in situations where there is not enough memory to run multiple conversions at the same time )
- plan disk access (if i see this correctly SS already does the conversion in memory, so this is not a problem.)
- maybe create a possibility for the user to disable this kind of multiprocessing.

Results would be:
- most possibly this will increase saving speed 2-3-5 fold depending on system. With the appearance of low power multi-core, low clock CPU-s this is just getting more important by time.

Cons:
- If you manage the number of processes well, then almost nothing. The program will use more of the system, but most users will greatly value the faster speed of saving.

Other things for consideration:
- Obviously saving JPEGs can be done the same way.
- PDFs are a bit more tricky, but PDFs are made of of pages, which can be created and joined afterwards.
   In GS it can be done like this:
   $ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

Michael Nagel (nailor)
Changed in simple-scan:
status: New → Triaged
importance: Undecided → Low
importance: Low → Wishlist
Revision history for this message
Thomas Martin Klein (kleintamasmarton) wrote :

Dear Michael.
Please reconsider moving this to Wishlist. I aimed to add this as an (unarguably low priotity) performance problem.

Bests

Revision history for this message
Michael Nagel (nailor) wrote :

Hello Thomas,

unfortunately we lack the manpower to regularly work on the most important problems
https://bugs.launchpad.net/simple-scan/+bugs?orderby=-heat&start=0

So whatever I set as priority this will not change anything about how fast this issue will be addressed.
Realistically this issue will only be fixed iff some volunteer steps up and fixes it for some reason.

Best Regards
Michael

Revision history for this message
Sylvain Viart (sylvain-viart) wrote :

This also the 1 core usage for writing to PDF format.

Pretty slow on powered CPU or VM.

soliloque (soliloque)
Changed in simple-scan:
assignee: nobody → soliloque (soliloque)
Revision history for this message
hartraft (hartraft) wrote :

Is it possible to take a look at this? I'm running simple-scan on an ARM based SBC and its quite a noticeable performance issue. I've been saving the scanned files on a quad core ASUS Tinkerboard and one core is maxing out whilst the others are under utilized.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.