Closed aurbroszniowski closed 9 years ago
Performance of the framework improves by more than 30% see the differences of TPS before and after the related changes:
Pure function (no re-instantiation needed) ALL | PUT | 20,467,344 | 114,340 | 0.009 ALL | GET | 183,750,373 | 1,026,536 | 0.002 ALL | MISS | 264,702 | 1,477 | 0.001 ALL | REMOVE | 0 | 0 | � ALL | EXCEPTION | 0 | 0 | � ALL | TOTAL | 204,482,419 | 1,142,353 | 0.002
Anonymous class syntax (instantiation of the function for every call) ALL | PUT | 20,501,018 | 82,999 | 0.018 ALL | GET | 184,402,281 | 746,566 | 0.002 ALL | MISS | 81 | 0 | 0.031 ALL | REMOVE | 0 | 0 | � ALL | EXCEPTION | 0 | 0 | � ALL | TOTAL | 204,903,380 | 829,565 | 0.01
stats are measured like this:
statisticsHolder.measure(cache.getName(), new Task() {
it requires the instantiation of a Task class just to have better readability, maybe there is a way not to have to instantiate the object on every call and still have something readable