Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379755

Summary: Saving a file can lock the UI thread for an unknown amount of time
Product: [WebTools] Dali JPA Tools Reporter: Troy Bishop <tjbishop>
Component: JPAAssignee: Brian Vosburgh <brian.vosburgh>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: melickm, neil.hauge
Version: 3.2   
Target Milestone: 3.3   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=336403
Whiteboard:

Description Troy Bishop CLA 2012-05-16 16:24:02 EDT
Build Identifier: 

This is a follow-on concern to the problem reported in bug 336403.

The process to build a JPA project is now done in a background job (Build JPA Projects) but in the context of a workspace lock, as mentioned in bug 336403 comment 19.  This prevents the immediate UI hang from happening when a JPA project is expanded to show the 'JPA Content' node; however, the UI hang is now delayed until a user attempts to do any UI action which locks on any object in the workspace, for example, save a Java file.  The UI will now display the 'User Operating is Waiting' dialog showing the various jobs that are executing (which is better than the UI hang that previous happened); however, it effectively means a user cannot do anything useful in the product until the 'Build JPA Projects' job is complete.

It would be really nice to have a finer-grained locking mechanism for the 'Build JPA Projects' job so that the UI is not locked for, potentially, a very long period of time.

Reproducible: Always

Steps to Reproduce:
1.  Import a JPA project into the workspace that has a large amount of JAR files on the build path.
2. Expand the project to initiate the 'Build JPA Projects' job.
3. Attempt to save a Java file in that project.  You will now be presented the 'User Operating is Waiting' dialog until the 'Build JPA Projects' job completes (which can be a significant amount of time, i.e. many minutes, depending on the amount of content on the build path).
Comment 1 Brian Vosburgh CLA 2013-01-28 18:38:28 EST
Fix checked into 'master' branch. At startup, Dali now locks the projects individually instead of locking the entire workspace.