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

Lists: Recycling principle #8

Open
Jatoxo opened this issue May 16, 2021 · 0 comments
Open

Lists: Recycling principle #8

Jatoxo opened this issue May 16, 2021 · 0 comments

Comments

@Jatoxo
Copy link
Collaborator

Jatoxo commented May 16, 2021

This is an optimization that might want to be considered in the future.

The current approach with lists is that for every data item in the list, one list entry object is created. Modern lists as for example in Android use a recycling-based list principle. This basically means that instead of creating a list entry object for every data item, we only create enough to fill the screen and maybe some more as buffers. Then we fill in these same list entry objects with different data items, essentially recycling them.

That said, our lists are usually not that long and any data item is too big to be initialized for filling the entries with, so it might be better to just keep it as it is

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

No branches or pull requests

1 participant