New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARTEMIS-1622 Reduce memory footprint of QueueImpl #1791
Conversation
@franz1981 why did we need to loose the generics on Node? it now means theres a cast on get, and alot of un-needed change IMO. if it was due to the extension now made here: PagedReferenceImpl extends LinkedListImpl.Node this could have been: PagedReferenceImpl extends LinkedListImpl.Node and like wise in MessageReferenceImpl |
@michaelandrepearce I will try to maintain the generics too if possible (not simple to fight with generics!) and about the cast it will be put already by the JVM with a thing called "uncommon trap" because generics live only at compile time and the JVM always prefers to be safer than sorry.
do you mean |
@michaelandrepearce The fact is that what Node contains is "enforced" by who use it and that is already generics (ie |
Makes sense and agreed anyone using the list wouldn’t be exposed to the node |
@michaelandrepearce That's the best I could think to reduce the number of changes but honestly |
LinkedListImpl is turned into an optionally intrusive linked list by allowing message references to extend Node.
@franz1981 looks good to me. |
LinkedListImpl is turned into an optionally intrusive linked list by allowing message references to extend Node