Skip to content

WIP: reduce memory footprint - #1

Draft
davidlamys wants to merge 1 commit into
AhmadDurrani579:mainfrom
davidlamys:propose-fix
Draft

WIP: reduce memory footprint#1
davidlamys wants to merge 1 commit into
AhmadDurrani579:mainfrom
davidlamys:propose-fix

Conversation

@davidlamys

Copy link
Copy Markdown

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 in

with
ForEach(samplePhotos) { photo in

we 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

…still not released when user scrolls past it... strange
@davidlamys

Copy link
Copy Markdown
Author

please do share your findings if you manage to solve it. :)

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.

1 participant