Skip to content

Commit

Permalink
MONDRIAN: Minor change to RolapEvaluator.getProperty(). Moved the get…
Browse files Browse the repository at this point in the history
…SolveOrder() call to before the more expensive call to getPropertyValue(). This allows skipping .getPropertyValue() in the majority of iterations through currentMembers.

This change made a modest but non-negligable (5-10%) performance boost to many queries I tested it with.  For example, the following monster query ran in 440 seconds before the change, 390 after (with native eval OFF in both cases to make sure all cells are evaluated):

select crossjoin(time.quarter.members, 
         crossjoin( [store type].members, crossjoin(product.[product name].members, 
                         promotions.members))) on 1,
  { measures.[unit sales], measures.[store sales] } on 0 
from sales

[git-p4: depot-paths = "//open/mondrian/": change = 13065]
  • Loading branch information
Matt Campbell authored and Matt Campbell committed Sep 28, 2009
1 parent 0dee5b2 commit f07f92c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/mondrian/rolap/RolapEvaluator.java
Expand Up @@ -604,10 +604,10 @@ public final Object getProperty(String name, Object defaultValue) {
continue;
}

final Object p = member.getPropertyValue(name);
if (p != null) {
final int solve = member.getSolveOrder();
if (solve > maxSolve) {
final int solve = member.getSolveOrder();
if (solve > maxSolve) {
final Object p = member.getPropertyValue(name);
if (p != null) {
o = p;
maxSolve = solve;
}
Expand Down

0 comments on commit f07f92c

Please sign in to comment.