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

Fixed performance issue when tinting tiles from large tilesets #4080

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Oct 15, 2024

Due to the tinting being applied to the entire tileset image, the 100 MB cache could easily be exhausted. This could result in the entire tileset image getting copied and tinted for each tile that is drawn.

Now only the relevant sub-rect is tinted and cached, which avoids doing needless tinting and has a much better performance even when the cache is not large enough.

@bjorn bjorn force-pushed the fix-tinting-performance branch 2 times, most recently from e34e27e to f868e07 Compare October 15, 2024 09:06
Due to the tinting being applied to the entire tileset image, the 100 MB
cache could easily be exhausted. This could result in the entire tileset
image getting copied and tinted for each tile that is drawn.

Now only the relevant sub-rect is tinted and cached, which avoids doing
needless tinting and has a much better performance even when the cache
is not large enough.
@bjorn bjorn merged commit 312c364 into mapeditor:master Oct 18, 2024
16 checks passed
@bjorn bjorn deleted the fix-tinting-performance branch October 18, 2024 05:59
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