Just a quick question, not a "I need help!" question, more to satisfy my curiosity :)
We have wrote our own custom jackson Json serialize and deserializer that uses reflection to serialize/deserialize an object. For example, for the serializer, it would look up an object's properties by using Introspector.getBeanInfo(), get the PropertyDescriptor the the current object field and call the read or write method to get and set the values when needed.
At first, this would take quite some time to do (250-500 milliseconds), however after so many calls to the serializer we noticed that this would drop drastically, to around 25-50 milliseconds. From looking around the internet, from what I can gather the JVM can optimize reflection, but how does it do this? Is it actually keeping track of each call to get the read or write methods and working out the bytecode so that the reflection part is skipped out?