Community
Participate
Working Groups
Created attachment 252381 [details] Profiling Screenshot Profiling shows that after fixing bug 464552 the next bottleneck in creation of AnonymousTypeCompletions [1] are: 1. IJavaElement element= fJavaProject.findElement(new String(declarationKey), null) and 2. StyledString label= fLabelProvider.createAnonymousTypeLabel(proposal); While 1. seems to be necessary on a first look (assuming that there really may be a case where the element may be null), 2. looks like a candidate for lazy initialization of the styled display string. If changing this, using LazyJavaCompletionProposal (or a subtype of it) as superclass looks more appropriate to me. However, the performance gain by bug 464552 is more significant. AFAICT ATM this change would be a noticeable but smaller enhancement. [1] org.eclipse.jdt.ui.text.java.CompletionProposalCollector.createAnonymousTypeProposal(CompletionProposal, JavaContentAssistInvocationContext)