Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Loading LeafPic takes forever #221

Closed
BlackLotus opened this issue Jul 5, 2016 · 8 comments
Closed

[Bug] Loading LeafPic takes forever #221

BlackLotus opened this issue Jul 5, 2016 · 8 comments

Comments

@BlackLotus
Copy link

When starting LeafPic fresh it takes over 15 seconds to show the galleries. (For me it takes constant 17 secs and in this time only shows the logo)
All in all I got a 40 Gallery-Folders and around 4000 images.
Other gallery apps I tested (google photos, stock gallery and simple gallery) take around 1-2 seconds.
Didn't yet look at the code for this.

@dnldsht
Copy link
Member

dnldsht commented Jul 5, 2016

@BlackLotus Reduced drastically the waiting time on launch in the coming release! :D

EDIT: if you want to try build the develop branch (1st time take long as now other times it takes less).

@BlackLotus
Copy link
Author

Tried both master and develop, but didn't really notice any speed boost (even after the second start)
Will take a closer look at it tomorrow after work.

@xtj-9182
Copy link

xtj-9182 commented Jul 6, 2016

I have noticed this as well. I have around 3000 folders with around 15 to 20 images each. For me it helped to exclude folders that I didn't need since most of those are from manga chapters.

Anyway I was thinking instead of loading all albums at once load the first few thumbnails/albums and as soon as they are loaded display them to the user. It could be shown with a loading spinner so that the user knows that something is happening. This way the user can already do something this makes it seem like the loading time is lower than it is. (and it's also what some other image viewers are doing)

@dnldsht
Copy link
Member

dnldsht commented Jul 6, 2016

@xtj-9182 @BlackLotus i forgot that it isn't enabled by default. you have to build this commit and disable the "Auto update media" setting

@xtj-9182
Copy link

xtj-9182 commented Jul 7, 2016

using around ~300 image folders it takes around ~33 Seconds on first cold start. Every cold start after this takes around ~2 Seconds due to the new serialization of the album arraylist.

pretty good but that initial cold start has me a little worried.

Edit: also not related but I'm seeing I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.

@dnldsht
Copy link
Member

dnldsht commented Jul 7, 2016

@xtj-9182 33 seconds are a lot, in my nexus 5 firs cold start takes ~5 seconds. do you have a SD card?

BTW I'm gonna add a setting that allow fetching media from media store so it should be more faster.

also not related but I'm seeing I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead

I have no idea where it is located in code, I'm getting this warming since first release

@xtj-9182
Copy link

xtj-9182 commented Jul 7, 2016

@dnldsht
Yes most of my media is on my sd card. Fun side note: when I first found out about leafpic around v0.3 I thought it wasn't working since the initial start up is so slow.

what are your thoughts on my initial proposal ?

instead of loading all albums at once load the first few thumbnails/albums and as soon as they are loaded display them to the user. It could be shown with a loading spinner so that the user knows that something is happening. This way the user can already do something this makes it seem like the loading time is lower than it is. (and it's also what some other image viewers are doing)

no idea if that would still be needed after your media store fetching optimizations.

about app:theme: too bad I thought it would be an easy fix :(.

@BlackLotus
Copy link
Author

Oh yeah just wanted to give my input as well.
The newest build certainly is fast enough and LeafPic is now again my main gallery app.
Thanks 👍

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

No branches or pull requests

4 participants