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 230410 - CamelCaseJump-Action is very slow - it always updates the tabtitle?
Summary: CamelCaseJump-Action is very slow - it always updates the tabtitle?
Status: RESOLVED DUPLICATE of bug 228991
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 21:14 UTC by markiewb
Modified: 2013-08-19 13:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sampling tree with annotation (285.55 KB, image/png)
2013-05-28 21:14 UTC, markiewb
Details
Sampling snapshot (63.87 KB, application/octet-stream)
2013-05-28 21:15 UTC, markiewb
Details
Used window/tab options (21.07 KB, image/png)
2013-05-28 21:16 UTC, markiewb
Details
snapshot (1.47 MB, application/octet-stream)
2013-07-09 12:56 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-05-28 21:14:13 UTC
[ BUILD # : 201305262300 ]
[ JDK VERSION : 1.7.0_21 ]

* Enable all the options for the new multirow tabs - see screenshot
* Hold the shortkey for "Insertion Point to Next Word"/"Insertion Point to
Previous Word" in a java file.

ACTUAL: the navigation is unexpectedly slow (the tab title will flicker; the
tab title seems to get updated by this navigation action - see screenshot of
sampling tree)
EXPECTED: ??? the tab title won't flicker (there is no need for updating the
tab title IMHO)
Comment 1 markiewb 2013-05-28 21:14:47 UTC
Created attachment 135028 [details]
Sampling tree with annotation
Comment 2 markiewb 2013-05-28 21:15:30 UTC
Created attachment 135029 [details]
Sampling snapshot
Comment 3 markiewb 2013-05-28 21:16:23 UTC
Created attachment 135030 [details]
Used window/tab options
Comment 4 Milutin Kristofic 2013-05-29 12:19:28 UTC
The problem is that after calling atomiclock, Netbeans sets file as modified, and this triggers title change, which should be a fast operation, but on your computer isn't. Maybe it isn't because your computer is busy and you use many multirow and this takes 2x (during locking and unlocking) half a second:

org.netbeans.core.multitabs.impl.TabLayoutManager$RowPerProjectTabLayoutManager.doLayout()	3.8485105	481 ms (3.8%)	481 ms

I think the problem should be fix in atomic lock and Mila said he is working on some changes, but it can take a long time. CamelCase doesn't need atomic lock and I can change it, but that is not big help, since every insert, delete is under atomicLock. Therefore I am sending this to Standa, he can look at how fast is layout and fix more problems by making it faster or smarter.
Comment 5 Milutin Kristofic 2013-05-29 14:08:13 UTC
Fixed CamelCase action. http://hg.netbeans.org/jet-main/rev/b95f733d68fe
Comment 6 Stanislav Aubrecht 2013-05-30 10:34:10 UTC
And I've improved the multi-tabs performance a bit in core-main 244969f57305
Comment 7 markiewb 2013-05-30 21:55:59 UTC
Thanks. I will give it a try in the next days.
Comment 8 Quality Engineering 2013-05-31 01:20:38 UTC
Integrated into 'main-golden', will be available in build *201305302301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b95f733d68fe
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #230410 - CamelCaseJump-Action is very slow - it always updates the tabtitle? - fix camelcase action
Comment 9 Egor Ushakov 2013-07-09 12:54:57 UTC
I still experience CamelCaseAction slowness in:
Product Version: NetBeans IDE Dev (Build 201307072319)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: SunOS version 5.11 running on x86; UTF-8; en_US (nb)

It really look like a call to doc.runAtomicAsUser triggers CloneableEditorSupport.updateTitles which updates names of all editors...
See attached snapshot
Comment 10 Egor Ushakov 2013-07-09 12:56:03 UTC
Created attachment 136875 [details]
snapshot
Comment 11 Egor Ushakov 2013-07-10 09:26:05 UTC
is doc.runAtomicAsUser really required for read-only actions?
Comment 12 Miloslav Metelka 2013-08-19 13:00:28 UTC
Fix of #228991 removes extra CloneableEditorSupport.notifyModify()/notifyUnmodify() call pairs so notifyModify() is only done upon real document modification which should eliminate this problem.

*** This bug has been marked as a duplicate of bug 228991 ***