jonnius / camera-scanner

This Repository has moved to Gitlab (Ubuntu Touch Camera Scanner App)
https://gitlab.com/jonnius/camera-scanner
Other
1 stars 4 forks source link

hight memory usage with images on dash #27

Open Danfro opened 5 years ago

Danfro commented 5 years ago

If there are several images on the dash the app takes up quite some memory and does take a while to load.

Memory after reboot before start of app:

screenshot20190411_230913454

Memory after starting camera scanner with 5 images on dash:

screenshot20190411_230949690

Memory after deleting 4 images and restarting camera scanner:

screenshot20190411_231213987

Danfro commented 5 years ago

Maybe worth to mention. All images where taken from within the app (that is imported straight from camera).

jonnius commented 5 years ago

Thanks for your hint. I see two ways to reduce storage used by cache:

To reduce RAM usage:

Danfro commented 5 years ago

Can maybe thumbnails be loaded/shown on the dash? Gallery app must be doing something in the line.

Then load the full image only for processing/editing. That should at least sort startup time.

jonnius commented 5 years ago

I think loading the images into RAM is what takes most of the time. So the only way to speed that up would be to save a thumbnail along with each image for displaying purpose.

But I don't think the camera scanner should scale up that much. It is not meant as a gallery, just as a session of scans to be exported as a PDF together. Maybe we should ask the user on startup whether he wants to restore the previous sessions and delete it otherwise. Also we are planning to have a "new session" button that clears the session.