Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
bizarre filter performance problem, is it rhino?
jsherriff
Background: Our app uses separate run and render tasks, a cube, and crosstab. If I add a cube filter consisting of:
((dataSetRow["ITEMLIST"] != null && dataSetRow["ITEMLIST"].split(",").indexOf('something') > -1)) = is True
In the app, it takes over 2 minutes to run the report on 2500 rows. Running the report from eclipse takes ~30 seconds - same query.
Removing the filter, or simplifying the filter down to dataSetRow["ITEMS"] != null, makes it run in ~7 seconds.
I'm baffled and open to any thoughts here.
Find more posts tagged with
Comments
jsherriff
Solved. Not sure what rhino's doing that makes this so slow, but it can be worked around by forcing it to use java Pattern's split and ArrayList's indexOf.
The following is (much) much faster than the original.
// do this once, in initialize
commaPattern = java.util.regex.Pattern.compile(",");
(new java.util.ArrayList(java.util.Arrays.asList(commaPattern.split(dataSetRow["ITEMLIST"]))).indexOf("something") > -1)