Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339634 - [performance] Quick fix create local variable and others can be slow
Summary: [performance] Quick fix create local variable and others can be slow
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marc-André Laperle CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 23:19 EST by Marc-André Laperle CLA
Modified: 2011-05-12 05:24 EDT (History)
2 users (show)

See Also:


Attachments
Quick fix performance improvements (3.77 KB, patch)
2011-03-11 00:12 EST, Marc-André Laperle CLA
malaperle: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2011-03-10 23:19:57 EST
Create local variable, create field and create parameter can be slow especially when they need to infer the type inside a function call. Most of the time is spent building ASTs inside CxxASTUtils.tryInferTypeFromFunctionCall
Comment 1 Marc-André Laperle CLA 2011-03-11 00:12:31 EST
Created attachment 190954 [details]
Quick fix performance improvements

The ASTs are built with the flag AST_SKIP_INDEXED_HEADERS but a null index is passed. The ASTs can also be cached, at least locally, so that they are not rebuilt. 

I see this as an interim improvement until we have a class like RefactoringASTCache available to codan. This will probably be done part of bug 337486 but I will keep this bug opened until then to make sure quick fixes take advantage of this.
Comment 2 Marc-André Laperle CLA 2011-03-11 00:16:18 EST
Committed to HEAD.
Comment 3 CDT Genie CLA 2011-03-11 00:23:41 EST
*** cdt cvs genie on behalf of mlaperle ***
Bug 339634 - [performance] Quick fix create local variable and others can be slow

[*] CxxAstUtils.java 1.12 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java?root=Tools_Project&r1=1.11&r2=1.12