Bug 179109

Summary: [misc] Editor computing AST twice concurrently
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 3.3   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Stack trace none

Description John Arthorne CLA 2007-03-23 15:46:13 EDT
Build: I20070322-1800

I did Open Type, and it was taking a long time to open the editor after I clicked finish.  I produced a stack dump while I was waiting, and I noticed that there are two threads creating an AST at the same time. Presumably they are even generating the same AST. It would be good to avoid creating the same AST multiple times when the editor is first opened.
Comment 1 John Arthorne CLA 2007-03-23 15:46:35 EDT
Created attachment 61871 [details]
Stack trace
Comment 2 Dani Megert CLA 2007-03-24 06:27:03 EDT
This should not happen. Did you open a class file editor or a CU editor?
Comment 3 Dani Megert CLA 2007-03-24 11:14:09 EDT
John, I ran the ASTProvider traces and I'm pretty sure that you opened a binary class - can you confirm that I'm on the right track?
Comment 4 John Arthorne CLA 2007-03-26 09:40:00 EDT
Yes, I believe I opened a binary type in this case.
Comment 5 Dani Megert CLA 2007-03-26 12:39:07 EDT
This was caused by a timing issue and code being too optimistic about the event flow and was in there since at least 3.1. Good catch!

Fixed in HEAD.
Available in builds > N20070326-0010.