DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-1208
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Kaarel Kann
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

Transaction cache cpu improvement

Created: 19/May/14 04:19 PM   Updated: 21/May/14 05:09 PM   Resolved: 20/May/14 11:36 AM
Component/s: Cache
Affects Version/s: 4.0.0.m3
Fix Version/s: 4.0.0.m4

File Attachments: 1. Zip Archive (6 kB)

Severity: Development

 Description  « Hide
Transaction cache iteration can save up to 4% cpu if linked hashmap is used

Andy Jefferson added a comment - 19/May/14 04:45 PM
Perhaps you should state your basis for "up to 4%". Some benchmark of different Map implementation performance somewhere?

Kaarel Kann added a comment - 20/May/14 08:48 AM
Attached performance test.
Results (3.3Ghz Intel i5):
with datanucleus-core-4.0.0-m3: 37406ms
with NUCCORE-1208: 35980ms

Pull request also filed:

Kaarel Kann made changes - 20/May/14 08:48 AM
Field Original Value New Value
Attachment [ 12068 ]
Kaarel Kann added a comment - 20/May/14 09:50 AM
I must admit that the difference fades away when adding warmup to the test, which means that HotSpot JVM can optimize it sufficiently. I'd still include it as I'm not sure that we can rely on JVM optimizations as HotSpot might not find it in real application server.

Andy Jefferson added a comment - 20/May/14 11:36 AM
GitHub master has this now. Thx.

Andy Jefferson made changes - 20/May/14 11:36 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.0.0.m4 [ 12184 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 21/May/14 05:09 PM
Status Resolved [ 5 ] Closed [ 6 ]