Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-415

Java client-proxy code getter method has performane issue

    XMLWordPrintableJSON

Details

    Description

      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().

      Attachments

        Activity

          People

            challenh Challen He
            challenh Challen He
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: