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 223984

Summary: Provide diagnostics for tasks running under document's read/write lock for a long time
Product: editor Reporter: Miloslav Metelka <mmetelka>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal CC: issues
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 221658    

Description Miloslav Metelka 2012-12-18 14:34:00 UTC
As pointed out by Vladimir there can be tasks that traverse document's content (e.g. a lexer's tokens) and take several hundreds of ms. Such task may block document modifications. We should establish a mechanism for identifying such tasks.
Comment 1 Miloslav Metelka 2012-12-18 15:05:15 UTC
Although AbstractDocument.readLock() and writeLock() are protected final, the render() and runAtomic() could be enhanced with the execution time checking functionality.
I propose to support configurable thresholds e.g.

-J-Dorg.netbeans.editor.document.readLockReportThreshold=300
-J-Dorg.netbeans.editor.document.writeLockReportThreshold=500

Exceeding the thresholds would report the problematic thread's stack. What do you think?
Comment 2 Vladimir Voskresensky 2012-12-18 15:26:08 UTC
Mila, Configurable properties are great. We'll run our responsiveness test with different values then.
Thanks!
Vladimir.
Comment 3 Martin Balin 2016-07-07 07:29:05 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss