Skip to content

Get ASTNode from ASTProvider#1052

Merged
jdneo merged 2 commits into
masterfrom
cs/astProvider
Aug 31, 2020
Merged

Get ASTNode from ASTProvider#1052
jdneo merged 2 commits into
masterfrom
cs/astProvider

Conversation

@jdneo

@jdneo jdneo commented Aug 31, 2020

Copy link
Copy Markdown
Member

Did some profiling to check the improvement. Given a 5000+ lines test file, doing the following operations:

  • 5 times of code completion (keep enter . and backspace)
  • write String a = "";
  • write String b = a;
  • insert code snippet systrace.

Before

WeChat Screenshot_20200831144332

After

WeChat Screenshot_20200831143822

@jdneo jdneo added this to the 0.25.0 milestone Aug 31, 2020
parser.setResolveBindings(true);
parser.setIgnoreMethodBodies(true);
return parser.createAST(monitor);
final CompilationUnit astRoot = CoreASTProvider.getInstance().getAST(unit, CoreASTProvider.WAIT_YES, monitor);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any difference if setting to WAIT_NO?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check and not very significant difference observed

@jdneo jdneo merged commit 3e8af8f into master Aug 31, 2020
@jdneo jdneo deleted the cs/astProvider branch August 31, 2020 09:37
@jdneo jdneo mentioned this pull request Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants