Skip to content

Commit 6bb9fd0

Browse files
committed
uhm, test perf: without cache but push separately
1 parent bd92b3c commit 6bb9fd0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

core/src/main/java/com/graphhopper/routing/weighting/custom/ExpressionBuilder.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ static SpeedAndAccessProvider create(CustomModel customModel, EncodedValueLookup
7474
String key = customModel.toString() + ",global:" + globalMaxSpeed;
7575
if (key.length() > 400_000) throw new IllegalArgumentException("Custom Model too big: " + key.length());
7676

77-
Class<?> clazz = customModel.__isInternal() ? INTERNAL_CACHE.get(key) : null;
78-
if (CACHE_SIZE > 0 && clazz == null)
79-
clazz = CACHE.get(key);
80-
if (clazz == null) {
81-
clazz = createClazz(customModel, lookup, globalMaxSpeed);
82-
if (customModel.__isInternal())
83-
INTERNAL_CACHE.put(key, clazz);
84-
else if (CACHE_SIZE > 0)
85-
CACHE.put(key, clazz);
86-
}
77+
// Class<?> clazz = customModel.__isInternal() ? INTERNAL_CACHE.get(key) : null;
78+
// if (CACHE_SIZE > 0 && clazz == null)
79+
// clazz = CACHE.get(key);
80+
// if (clazz == null) {
81+
Class clazz = createClazz(customModel, lookup, globalMaxSpeed);
82+
// if (customModel.__isInternal())
83+
// INTERNAL_CACHE.put(key, clazz);
84+
// else if (CACHE_SIZE > 0)
85+
// CACHE.put(key, clazz);
86+
// }
8787

8888
try {
8989
// The class does not need to be thread-safe as we create an instance per request

0 commit comments

Comments
 (0)