Hi Randy, we've recently come across a scalability problem in JETT related to concurrent report execution. Using some performance tracing tools we have determined the following problem:
ExcelTransformer uses ExpressionFactory. ExpressionFactory is a Singleton class which uses the JexlEngine class of org.apache.commons.jexl2
The problem itself is found in JexlEngine in the parse() method where the parser is synchronized, this is what creates the bottleneck.
We may have avoided this problem had there been a way to use a new ExpressionFactory instance as it will create a new JexlEngine.
We have no way here to extend the class as ExpressionFactory as it has only a private constructor, and no setter; it has only a getter that will return the singleton instance.
Would you be able to offer us some suggestions or even better would be to fix this and release an updated version of jett since at the moment this causes a major problem with concurrent report execution. Please help!
Thanks again Randy.
Here are my thoughts on allowing multiple
ExpressionFactory
s in JETT.Are you using multiple
ExcelTransformer
s in a multi-threaded environment? Is that what ultimately leads to contention when theJexlEngine
'sparse
method is called, locking the parser?I could make the
ExpressionFactory
class no longer a singleton class but a normal factory object. Then eachExcelTransformer
can own aJexlEngine
. There would no longer be contention in theJexlEngine
because eachExcelTransform
would use its ownJexlEngine
.What do you think?
Yes this is what we were looking for. Please apply this fix and if possible make a new JETT release so that we can consume those changes. Very much appreciated.
Thanks
Mark,
I have checked in code for this ticket. This code removes the singleton status on
ExpressionFactory
. Each instance ofExcelTransformer
now owns its ownExpressionFactory
, which it stores in theWorkbookContext
for transforming.This will be in the next version of JETT.
Thanks again randy. Any idea as to when we might expect a new release?
Thanks
There are a couple more things I'd like to include in a new release, including the bug fix for Ticket 41, plus a new "ana" tag to complement the new Analytic functionality I released in jAgg 0.9.0 recently. I may or may not decide to tackle respecting Conditional Formatting, depending on how complex this turns out to be.
I'm estimating that within 2-3 weeks I will make the next release for JETT.
In the mean time, you are always free to check out the source code for JETT and build it yourself. Let me know if you experience any issues building JETT yourself.
This was included in JETT 0.9.0, which was published on December 19th, 2014.