Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

More than two minutes to start the app #26

Open
mihaelmilea opened this issue Aug 25, 2017 · 10 comments
Open

More than two minutes to start the app #26

mihaelmilea opened this issue Aug 25, 2017 · 10 comments
Labels

Comments

@mihaelmilea
Copy link

I have many, many pictures and it takes more than two minutes to start the app, meanwhile one core CPU is used 100%. The pictures are stored on the SD card. With the SD card removed the app starts imediately.

@nfsprodriver
Copy link
Member

So we may need some asyncronously loading in some places of the program.

@Flohack74
Copy link
Member

Plus, when I open the gallery app after some days, not all pictures are loaded. Specifically it seems that it loads only up to the last 24hrs. Close again, open, it works.

@TronFortyTwo
Copy link
Collaborator

Yes, currently ALL the media in the device are loaded (not fully, but I think each one is at least checked) at launch, this means a long load time for large collection. This is one of the issues can be solved when we will implement collections/folder media organization.

@mihaelmilea
Copy link
Author

Could we just get a as-of-now quick fix, let's say at start it loads only the first n number of pictures and then it loads the rest of them in the background? I am facing every day this issue... Sometimes I want to show somebody a picture and, if somehow meanwhile the gallery closed, I have to wait the two minutes for it to start... I am not complaining, I am soooo thankfull for all your work, thank you! :)

@sverzegnassi
Copy link

@TronFortyTwo Do you think that switching to MediaScanner2 as a backend for gallery-app could help?
If memory serves me well, it provides a media database that is sinchronized in background, any time a new picture or video is saved on disk. That might help by erasing the time spent during the initial consistency check. Could it be suitable?

@TronFortyTwo
Copy link
Collaborator

Maybe. Surely update a library is always a good idea, so I will try to do that asap, hoping it helps here.

@mihaelmilea
Copy link
Author

@Flohack74 changed the ping interval in the push server to 5 minutes and then I also did the changes to /etc/xdg/ubuntu-push-client/config.json sugested in ubports/ubuntu-touch#415 and then I restarted the phone for those changes to take effect.

Now my gallery starts instantly!!! As if there was something wrong with my phone, I restarted the phone and checked it again: gallery starts instantly!!! For more than a year it would take two minutes to start the gallery.

I don't know if what I wrote in the first paragraph is related. But I thought to mention it here. If this stays like this then my issue is solved.

@Flohack74
Copy link
Member

Huh? This cannot be, somehow. push service has nothing to do with gallery. Please observe :) In any case, gallery should have a lazy loading, for only the picutres on screen plus a few outside to support faster scrolling experience.

@mihaelmilea
Copy link
Author

@Flohack74 you are right, I realized it loads fast now because for some reason it does not detect the SD card where I have all the pictures (would that have anything to do with the modifications of /etc/xdg/ubuntu-push-client/config.json ?). Sorry for the confusion!

@Flohack74
Copy link
Member

No, this cannot affect the SD card also. Maybe try to re-insert it, some contact problem?

BR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants