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

Improvements for ScaledImageCache #883

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

castroal
Copy link

@castroal castroal commented May 6, 2024

This PR slightly modify the Image class to use a dictionary for the ScaledImageCache instead of a LinkedList to eliminate the need for a linear search.

@MarcinZiabek
Copy link
Member

Thank you for reviewing the code and preparing the PR.

The LinkedList is actually used on purpose. The expectation is that the collection will store only one item in most cases. Introducing the dictionary-related costs (memory and lookup) may decrease performance.

But I am open to discussing it and performance testing 😄

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.

None yet

2 participants