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

[App Performance] Low Performance Issues #142

Closed
hmaltr opened this issue May 29, 2020 · 9 comments
Closed

[App Performance] Low Performance Issues #142

hmaltr opened this issue May 29, 2020 · 9 comments

Comments

@hmaltr
Copy link
Contributor

hmaltr commented May 29, 2020

When searching a manga or loading a page (main page) the app stops for 5-6 secs then continues as normal, before it was progressive and more responsive. Can you optimize it a little bit? Thanks.

@hmaltr
Copy link
Contributor Author

hmaltr commented May 30, 2020

Samsung A50 running Android 10

@Dar9586
Copy link
Owner

Dar9586 commented May 31, 2020

I don't know if I fixed this by mistake, but testing on:

  • Emulator API 29 (Android 10)
  • Emulator API 16 (Android 4.1)
  • Physical device API 28 (Android 9)

It didn't give me any performance issues, even using the performance analyzer of Android Studio, with version 2.3.5, if it continues being slow maybe it is the connection with the nhentai/nhent.ai site which is slow

@hmaltr
Copy link
Contributor Author

hmaltr commented May 31, 2020

Yes it was the connection but the app freezes and even android ANR appears.
Can you make it progressive? Instead of waiting to load everything? Because browsing becomes impossible because of constant freezes

@hmaltr
Copy link
Contributor Author

hmaltr commented Jun 9, 2020

@Dar9586 what did you change 2.3.4? The app lags in the newer versions.

@Dar9586
Copy link
Owner

Dar9586 commented Jun 10, 2020

In 2.3.4 Literally a line of code Commit (was made in order to fix #134)
While in 2.3.3 there are 2 commits (Commit1, Commit2)
The second commit only adds a function which is never used.
The first commit instead mostly changes how the communication work when logged (adding favorite or login) now while the first commit. The cahnges in the MainActivity (which is the default and the one which is slow) are:

  • The addition of the confirm when downloading all (used only when pressed)
  • A small refactor which can't compromise the performance (Instead of calling the function, now there is a function which calls the old function with the right paramters)
  • A flag only used when exiting from the Manage tags

The only notable change has been:

  • the update of Gradle (the software which handles all the dependencies and the compilation) but I only updated the version
  • the update of the proguard file (which make the release build smaller), but it will only remove all the debug messages

But using both emulators and physical devices with both version I couldn't find any difference in speed/responsiveness using also an ultra slow connection (can be simulated using the emulator)

@Dar9586
Copy link
Owner

Dar9586 commented Jun 10, 2020

Maybe I found the problem, fixed APK this APK is the same of 2.3.8 but with a function disabled, maybe it could be the source of the problem. If it fixed the problem let me know and I will implement it in the next update

@hmaltr
Copy link
Contributor Author

hmaltr commented Jun 10, 2020

Yes it fixed the problem hopefully 😃

@Dar9586
Copy link
Owner

Dar9586 commented Jun 10, 2020

The problem was caused from the more metadata of the gallery used for #126. When a gallery was loaded it search for the id, but the parsing required a lot of time, now it should be fixed, but still caching the images from local storage

@hmaltr
Copy link
Contributor Author

hmaltr commented Jun 10, 2020

The problem was caused from the more metadata of the gallery used for #126. When a gallery was loaded it search for the id, but the parsing required a lot of time, now it should be fixed, but still caching the images from local storage

Well at least its usable now :)

@hmaltr hmaltr closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants