activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelandrepearce <>
Subject [GitHub] activemq-artemis issue #1263: ARTEMIS-1156: FIX: Long Autoboxing occurring o...
Date Thu, 11 May 2017 07:40:39 GMT
Github user michaelandrepearce commented on the issue:
    So we have:
    1. primitive collections
    1. id's as objects (Long in this case)
    1. flywheel/interning caching pattern
    For 1:
     we have tried, looks good as long as we just do hot paths, can very quickly over complicate
our code, or start bringing negative effects.
    For 2:
    I haven't had a chance to see how much work, but this maybe simpler/cleaner imho. Though
does lend its self to people in future accidentally introducing the boxing issue again.
    For 3:
    Should work nicely, but only upto a predefined cache size. e.g. what occurs if cache size
is N and i end up with N+1000 longs, we end up in same position as with Long.valueOf. 
    Also some complexities introduced, how big should the cache be? how does someone tune
it, i run a very large vm, but fred runs a small one, this works for an app that you deploy
just in your own DC, but I'm weary of setting a magic cache size where it gets deployed in
many differing env's.
    For this reason, id personally favour looking into option 2, then keeping a low scoped
option 1.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message