You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2008/02/14 18:11:08 UTC
[jira] Commented: (HARMONY-5284)
[drlvm][startup][performance][classloader] lookup for methods and fields
[ https://issues.apache.org/jira/browse/HARMONY-5284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569003#action_12569003 ]
Alexey Varlamov commented on HARMONY-5284:
------------------------------------------
I suggest the following steps to proceed with this issue:
1) Enhance ClassRegistry with findMatchingMethod / findMatchingDeclaredMethod w/o using hash; and keep Java-side cache (i.e. first check the cache then fall back to JNI). BTW, it is possible to add a lookup cache, like Map<Integer, Member> which maps a hash (name, args) to the member thus avoid recurring JNI calls. Hard to say if caching is beneficial, need some real-world statistics...
2) Check if using hash on native side gives any improvement over linear search. Frankly, I suspect it is negligible and just complicates code.
Note, some extra care should be taken for matching covariant return types, it is missing in the prototype patch. Namely, specification states:
"If more than one method with the same parameter types is declared in a class, and one of these methods has a return type that is more specific than any of the others, that method is returned".
> [drlvm][startup][performance][classloader] lookup for methods and fields
> ------------------------------------------------------------------------
>
> Key: HARMONY-5284
> URL: https://issues.apache.org/jira/browse/HARMONY-5284
> Project: Harmony
> Issue Type: Sub-task
> Components: DRLVM
> Reporter: Naumova Natalya
>
> It's for better lookup procedures for methods and fileds resolving; moving Class.getMethod to JNI :
> There was just linear search for lookup methods and fileds in DRLVM, so using hash for lookup improves the performance on startup.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.