Optimize large asset loading for 80% performance improvement - #377
Open
WannaBe2D wants to merge 1 commit into
Open
Optimize large asset loading for 80% performance improvement#377WannaBe2D wants to merge 1 commit into
WannaBe2D wants to merge 1 commit into
Conversation
|
if this really works, we should be pushing this for merge? what are your thoughts on pushing? |
Author
It really does work on mid-range devices. We have animations that are 10 MB in size, and they take a long time to load on budget and mid-range devices. Thanks to parallelisation, the whole process has become significantly faster. I would recommend refining this feature for all types of animations and adding a separate flag so that parallel processing can be enabled and disabled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description:
Issue: In the project, we encountered a delay in the splash screen animation on less powerful devices. The size of our animation was 4.6 MB. After some analysis, I noticed that the most time-consuming part was the loop responsible for loading images.
Solution: To address this without breaking other logic, I opted for the safest approach by using Future.wait to parallelize image loading. This optimization led to a significant performance improvement of 80%. The average execution time dropped from 2300ms to 300ms after this adjustment.
This change should enhance the user experience by reducing the delay in displaying the splash screen animation.