0

I'm using AppD as APM for my application and in slow transaction reports it shows most of the calls, which is not our application code and we are calling open source libraries method. For example :

com.google.common.reflect.TypeVisitor.visit method of google library takes almost 155 ms time and com.google.common.reflect.TypeToken.equals() method takes almost 60 ms. and org.apache.tapestry5.internal.services.RenderQueueImpl.render() takes almost 50 ms.

I want to highlight that I've checked and my server is not loaded and both CPU and memory usage is very low as well this time taken is for very small amount of data processing.

Let me know the reason behind this and how can I optimize the performance of my application.

Micho
  • 3,929
  • 13
  • 37
  • 40
Amit
  • 30,756
  • 6
  • 57
  • 88

1 Answers1

1

Reflection (inherently TypeVisitor and TypeToken classes) is always costly in Java, try not using it. Rendering time seems OK. There can be thousand reasons for high latency in an application, but you only gave this much information so that's about the best answer you can get.

bekce
  • 3,782
  • 29
  • 30
  • I understand that reflection takes time but 50-60 ms for a single call is actually too much , entire spring runs on reflection still it is fast and for a sample REST api which i developed using Spring, which hits the DB and does business processing used to take less than 100 ms . In my case right now i am concerned only to understand the performance of my application code which is reported by AppD. – Amit Jan 20 '17 at 11:55