google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Excessive calls to debug logging dramatically slow down serialization of large object graphs #425

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version are you using? (Morphia/Driver/MongoDB)
Morphia 1.00-Snapshot

The bug is in Mapper.Java.
log.Debug is called whenever a class is found with no annotations. this happens 
very frequently for large object graphs where only the root is annotated.
It seems the default logger raises an exception on debug to log the point of 
execution.
added a simple if (log.isDebugEnabled()) before the logging call.

patch from trunk version attached.

Original issue reported on code.google.com by yo...@cybereason.com on 16 Aug 2012 at 7:54

Attachments: