You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performance could be increased I think if both WantsDataRestartException and NeedsLockRestartException (and perhaps other) were static and not saving the stack.
@fbacchella thanks for the analysis. That looks like a quick win. I will put an improvement in the next release.
I also looked at your code. Using JCache you need to do per entry TTL by yourself. Cache2k would support this directly and do an efficient expiry via timer wheel and scheduler.
I’m using cache2k 2.0.0.Final.
In org.cache2k.processor.EntryProcessor, I see the code:
So it's code were exception are used as flow control. But it's usually a bad idea, see https://shipilev.net/blog/2014/exceptional-performance/ for a deep analysis of that.
For example, when generating flamegraph for some of my code, I get the following result:
Most of the time is spent filling in the stack trace.
The code that generate this stack can be found at NettyNameResolver.java
Performance could be increased I think if both WantsDataRestartException and NeedsLockRestartException (and perhaps other) were static and not saving the stack.
This constructor can be used for that:
If writableStackTrace is set to false, the stack trace is not saved.
The text was updated successfully, but these errors were encountered: