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

Optimize map accesses in LadspaManager #7173

Merged

Conversation

michaelgregorius
Copy link
Contributor

Some methods in LadspaManager performed several searches through the map by first calling contains and then by actually fetching the entry. This is fixed by using find on the map. It returns an iterator which can directly provide the result or show that nothing was found. That way we only search through the map once.

Some methods in `LadspaManager` performed several searches through the map by first calling `contains` and then by actually fetching the entry. This is fixed by using `find` on the map. It returns an iterator which can directly provide the result or show that nothing was found. That way we only search through the map once.
src/core/LadspaManager.cpp Outdated Show resolved Hide resolved
src/core/LadspaManager.cpp Outdated Show resolved Hide resolved
src/core/LadspaManager.cpp Outdated Show resolved Hide resolved
@michaelgregorius michaelgregorius merged commit a98c700 into LMMS:master Mar 30, 2024
9 checks passed
@michaelgregorius michaelgregorius deleted the LadspaManagerOptimizeMapAccess branch March 30, 2024 07:53
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

3 participants