Skip to content

Conversation

@simonrozsival
Copy link
Member

I noticed there were thousands of log messages such as I monodroid: Loaded type: Java.Lang.Object printed in logcat while running unit tests. It turns out we aren't caching the resolved type mappings when the GetJavaToManagedType method is called from AndroidRuntime.GetTypesForSimpleReference. This hurts performance because the call to clr_typemap_java_to_managed is fairly expensive.

This PR makes sure we're using the TypeManagerMapDictionaries.JniToManaged cache in this codepath.

@simonrozsival
Copy link
Member Author

/cc @grendello

@simonrozsival simonrozsival requested a review from grendello June 4, 2025 09:42
@simonrozsival
Copy link
Member Author

@grendello PTAL

@jonathanpeppers jonathanpeppers enabled auto-merge (squash) June 4, 2025 19:38
@jonathanpeppers jonathanpeppers merged commit 05f57b3 into main Jun 5, 2025
59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/srozsival/cache-get-java-to-managed-type branch June 5, 2025 09:00
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants