WIP: reduce memory footprint - #1
Draft
davidlamys wants to merge 1 commit into
Draft
Conversation
…still not released when user scrolls past it... strange
Author
|
please do share your findings if you manage to solve it. :) |
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.
So far what I have done is to create a lot more images in the asset library so that the memory footprint will be much more obvious. this works in a sense that i can bump up the memory footprint to 2gb!!!
Next I extracted the method out and put a print statement, this shown me that even though it was a lazy grid, all the images was initialised at once.
Somehow, when I replace the
ForEach(samplePhotos.indices) { index inwith
ForEach(samplePhotos) { photo inwe will load less photos in the initial load.
@AhmadDurrani579
wip - this loads less photos in the initial load, but the photos are still not released when user scrolls past it... strange