You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Challen (JIRA)" <ji...@apache.org> on 2014/08/24 18:14:37 UTC

[jira] [Commented] (OLINGO-415) Java client-proxy code getter method has performane issue

    [ https://issues.apache.org/jira/browse/OLINGO-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108437#comment-14108437 ] 

Challen commented on OLINGO-415:
--------------------------------

https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=9c78784deea668e2e2999141569fa1450bd498a2
now on the same testing device, with debugger attached, the below 100 times of .getDateTimeSent() takes 1.2s ~ 1.5s, instead of 4s ~ 4.5s. (without debugger attached, it will be a bit faster)
 ==================
 for (Message m : mc) 
{ i++; date = m.getDateTimeSent(); } 
==================


> Java client-proxy code getter method has performane issue
> ---------------------------------------------------------
>
>                 Key: OLINGO-415
>                 URL: https://issues.apache.org/jira/browse/OLINGO-415
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: V4 4.0.0-beta-01
>            Reporter: Challen
>            Assignee: Challen
>             Fix For: V4 4.0.0-beta-01
>
>
> when running with debugger attached, the below 100 times of .getDateTimeSent() takes 4s ~ 4.5s. (though without debugger attached, it can be a bit faster)
> ==================
>                        for (Message m : mc) {
> 				i++;
> 				date = m.getDateTimeSent();
> 			}
> ==================
> one of the causes: 
> AbstractStructuredInvocationHandler.invoke(..) method takes time to check (isSelfMethod()) first, then check (method.getName().startsWith("get")), so get- method on the proxy object is slowed down beause isSelfMethod() loops through all self methods by reflection.
> so the fix is to check get- set- first before checking isSelfMethod().



--
This message was sent by Atlassian JIRA
(v6.2#6252)