Community
Participate
Working Groups
Build Identifier: 20100218-1602 Class org.eclipse.imp.pdb.facts.impl.fast.AnnotatedConstructor uses a hashmap to store the annotations on the constructor, even in cases where there is just one annotation. If a large number of uses of this class have just one annotation, this leads to considerable memory overhead. It may work better to have a specialized version of the AnnotatedConstructor tailored to just one annotation, switching over to the current version (for arbitrary numbers of annotations) automatically when needed. Reproducible: Always Steps to Reproduce: 1. Run a program that creates a large number of constructors. 2. Assign a single annotation to each. 3. Watch memory usage grow.
Created attachment 167883 [details] Patch to specialize Annotated Constructors for 1, 2 and 3 annotations. This code was written by Mark Hills (CWI)
Applied the patch. The bug is left open, since the SharedValueFactory implementation still suffers from this problem.
The shared implementation inherits from the fast implementation, thus the bug is solved in both.