Message9623
William, one thing: did you try changing the concurrency level in MapMaker? We are using the default, which is 4, which may explain the lock contention you are seeing. If you haven't, could you try running your performance tests with a higher level?
Per the docs, "a significantly lower value can lead to thread contention"
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/MapMaker.html#concurrencyLevel(int)
So you might want to try something like
public static synchronized PyType fromClass(Class<?> c, boolean hardRef) {
if (class_to_type == null) {
class_to_type = new MapMaker().concurrencyLevel(16).weakKeys().weakValues().makeMap();
addFromClass(PyType.class, null);
}
We might want to make this the default regardless, given that this is a singleton. |
|
Date |
User |
Action |
Args |
2015-03-11 21:50:01 | zyasoft | set | messageid: <1426110601.19.0.593790580579.issue2230@psf.upfronthosting.co.za> |
2015-03-11 21:50:01 | zyasoft | set | recipients:
+ zyasoft, amak, wdroste |
2015-03-11 21:50:01 | zyasoft | link | issue2230 messages |
2015-03-11 21:50:00 | zyasoft | create | |
|