Skip to content

Optimize large asset loading for 80% performance improvement - #377

Open
WannaBe2D wants to merge 1 commit into
xvrh:masterfrom
WannaBe2D:assets-loading
Open

Optimize large asset loading for 80% performance improvement#377
WannaBe2D wants to merge 1 commit into
xvrh:masterfrom
WannaBe2D:assets-loading

Conversation

@WannaBe2D

Copy link
Copy Markdown

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.

@opheliagame

Copy link
Copy Markdown

@WannaBe2D

if this really works, we should be pushing this for merge? what are your thoughts on pushing?
is there any evidence for the performance improvement made here?

@WannaBe2D

Copy link
Copy Markdown
Author

@WannaBe2D

if this really works, we should be pushing this for merge? what are your thoughts on pushing?

is there any evidence for the performance improvement made here?

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.

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

Successfully merging this pull request may close these issues.

2 participants