This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87637

Summary: Frozen UI when using inline diff
Product: utilities Reporter: _ rkubacki <rkubacki>
Component: DiffAssignee: diff-issues@utilities <diff-issues>
Status: RESOLVED FIXED    
Severity: blocker CC: issues
Priority: P2 Keywords: THREAD
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: thread dump

Description _ rkubacki 2006-10-20 13:47:13 UTC
dev build from Oct 19, JDK 6b98

I turned on diff sidebar in view menu and tried to find some tooltip and switch
to another document. I do not know what is actual cause of problem but EDT
thread waits for some lock and RP thread pool is exhausted with 50 requests that
are all waiting wor some document lock that probably will need something from EDT.
Comment 1 _ rkubacki 2006-10-20 13:48:57 UTC
Rather a threading problem than a performance bug. OTOH it might be better to
serialize tasks sent to RP here too.
Comment 2 _ rkubacki 2006-10-20 13:49:54 UTC
Created attachment 35415 [details]
thread dump
Comment 3 Maros Sandor 2006-10-20 14:15:18 UTC
I believe this was caused by unnecessary synchronization in DiffSidebar which
was removed yesterday, please verify in later builds. (DiffSideBar.java @ 1.7)
Comment 4 Petr Nejedly 2006-10-20 14:27:44 UTC
> OTOH it might be better to serialize tasks sent to RP here too.
Not better, I believe this is absolutely necessary, as this code has the
potential to quickly exhaust the RP pool because of e.g. short network outage.
Reopening as P2.
Feel free to close again if you believe that the code won't really block while
running more requests concurrently.
Comment 5 Maros Sandor 2006-10-20 14:30:22 UTC
Yes, I plan to create my own RP, it just won't deadlock anymore but may fill up
RP eventually if there are many files open.
Comment 6 Maros Sandor 2006-10-20 14:38:41 UTC
Created a dedicated RP for diff sidebars.

/shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/diff/DiffSidebar.java,v
 <--  DiffSidebar.java
new revision: 1.8; previous revision: 1.7
/shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/diff/DiffSidebarManager.java,v
 <--  DiffSidebarManager.java
new revision: 1.3; previous revision: 1.2