[Mulgara-dev] Performance problem with StackTrace generation

Morten Grouleff mgr at trifork.com
Thu Aug 21 10:10:16 UTC 2008


While profiling a call to "Fedora risearch", I noticed a lot of time spent in StackTrace.getStringTrace(), called by 
HybridTuples and CacheLine. In my particular run, the time spent was 54% of all time spent processing the query. That is 
a high price to pay for debugging messages, that were never even printed.

So, in line with what is done in other classes in Mulgara, I suggest to encapsulate these stacktrace-generation and 
printouts in "if (logger.isDebugEnabled())". The code still logs errors on double close, but does not make stacktraces 
while not in debug-logging mode.

Proposed patch attached.
-- 
Regards,
Morten Grouleff
--------------------------------------------------------------------
Trifork A/S,  Margrethepladsen 4, DK-8000 Aarhus C, Denmark.
JAOO 2008: Sep. 28. - Oct. 3. 2008  http://jaoo.dk/   See you there?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid-expensive-stacktraces.patch
Type: text/x-diff
Size: 4192 bytes
Desc: not available
URL: <http://lists.mulgara.org/pipermail/mulgara-dev/attachments/20080821/442f2388/attachment.bin>


More information about the Mulgara-dev mailing list