Bug 179109 - [misc] Editor computing AST twice concurrently
Summary: [misc] Editor computing AST twice concurrently
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2007-03-23 15:46 EDT by John Arthorne CLA
Modified: 2007-03-26 12:39 EDT (History)
0 users

See Also:


Attachments
Stack trace (14.65 KB, text/plain)
2007-03-23 15:46 EDT, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.