-
Notifications
You must be signed in to change notification settings - Fork 36
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
IPROTO-155 Reduce FileDescriptor memory usage #226
base: main
Are you sure you want to change the base?
IPROTO-155 Reduce FileDescriptor memory usage #226
Conversation
* Use ArrayList instead of LinkedList * Resolve annotations eagerly
|
||
private void calculateSize(Map<String, FileDescriptor> descriptors) { | ||
for (Map.Entry<String, FileDescriptor> descriptor : descriptors.entrySet()) { | ||
System.out.println("Total Size = " + GraphLayout.parseInstance(descriptor.getValue()).totalSize()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always log this as debug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion here.
I'm also testing the changes on current Infinispan main.
* @return the map of annotations | ||
* @throws AnnotationParserException if parsing of annotations fails | ||
*/ | ||
Map<String, AnnotationElement.Annotation> getAnnotations() throws AnnotationParserException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can keep the method implemented as as default simpy delegating to getProcessedAnnotation("")
Sorry @tristantarrant I only noticed running this patch on current Infinispan main, that there are some cases where the annotations field is filled and An idea to keep the optimization, is to fill the annotations list only if:
at the end of processAnnotations methods. WTDY? |
https://issues.redhat.com/browse/IPROTO-155
Parse annotations eagerly to avoid keeping them around.