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

Possible improvement of app performance inside the home page #2051

Open
4 tasks
NicolasPotesG opened this issue Dec 4, 2021 · 5 comments
Open
4 tasks

Possible improvement of app performance inside the home page #2051

NicolasPotesG opened this issue Dec 4, 2021 · 5 comments
Labels
needs:triage New issue that needs triage resolved:stale No recent activity on the issue or PR source:public Issues created by the public

Comments

@NicolasPotesG
Copy link

Summary

An analysis of the performance of the application was carried out and on the home page a certain Jank (slow frame) could be perceived that can affect the user experience and produce possible GUI lagging. Possibly this is due to the loading of several images (SVG) and loading of many elements.

Desired Solution

You can preload the images (SVG) used in the header, in the Protect yourself section, in the donate section and the images of that page (home) using the precachePicture function of the flutter_svg library that can be obtained in pub.dev, with a Future.wait[] you can preload all the images in picture cache making use of this function in a file that is executed before than the home page (for example, main.dart). Additionally, in the ScrollView used for the cards in the Protect yourself section of this same page you can use the lazy_load_scrollview library also obtained from pub.dev which allows lazy loading, i.e. only the visible portion of the cards is built at startup time.
These changes can improve the performance of the application in this page that loads so many elements and images.

Additional Context

Below is a possible implementation that can be applied in the code in main.dart to preload some images from home.dart (based on the above):
image

To preload images like the following (image used in the donate section of home):
image

Additionally, the ScrollView found in the Protect yourself section could be wrapped with the LazyLoadScrollView:
image

It is worth mentioning that these are suggestions that can be replaced with other suggestions that will improve the performance of the application much more. The important thing to note is that the application can have poor performance due to rendering many images and elements at the same time on a page.

Checklist:

  • Check the Home page inside the repository and identify each of the components and their images.
  • Check this open issue in GitHub community.
  • Check the library flutter_svg and its precachePicture function in pub.dev.
  • Check the library lazy_load_scrollview in pub.dev.
@NicolasPotesG NicolasPotesG added needs:triage New issue that needs triage source:public Issues created by the public labels Dec 4, 2021
@stale
Copy link

stale bot commented Jan 6, 2022

This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the resolved:stale No recent activity on the issue or PR label Jan 6, 2022
@tusharkhatriofficial
Copy link

Hi! I would like to work in this issue.

@stale stale bot removed the resolved:stale No recent activity on the issue or PR label Apr 29, 2022
@stale
Copy link

stale bot commented Jun 4, 2022

This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the resolved:stale No recent activity on the issue or PR label Jun 4, 2022
@ANUKULJHA1506
Copy link

@NicolasPotesG I want to work on this issue , please assign me this

@stale stale bot removed the resolved:stale No recent activity on the issue or PR label Jun 19, 2022
@stale
Copy link

stale bot commented Jul 31, 2022

This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the resolved:stale No recent activity on the issue or PR label Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage New issue that needs triage resolved:stale No recent activity on the issue or PR source:public Issues created by the public
Projects
None yet
Development

No branches or pull requests

3 participants