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 254833

Summary: Is not possible to work with editor after Replace all
Product: web Reporter: Petr Pisl <ppisl>
Component: HTML NavigatorAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: mfukala
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Test file, where you can reproduce the problem
The snapshot of the action.

Description Petr Pisl 2015-08-28 20:56:22 UTC
Created attachment 155729 [details]
Test file, where you can reproduce the problem

To reproduce the problem, open the attached file. If Navigator window is not opened, open it. The html item should be expaned. If it is not expanded, expand. 

Then select "<div class="match">" at the second line and call Replace functionality (CTRL + H). In the Replace area Find What should contain selected text and the Replace With field leave blank. Now click Replace All (but this is not important, you can write what you want :)). The items in navigator are reordered and it takes on my machine in this case more then 3 minutes. During this time is impossible to work with the ide at all. 

The file is not big. It has only 286 lines and the lines are not long (max 120 chars). 

I'm also attaching snapshot.
Comment 1 Petr Pisl 2015-08-28 20:57:14 UTC
Created attachment 155730 [details]
The snapshot of the action.
Comment 2 Petr Pisl 2015-08-28 20:57:41 UTC
So the workaround is close Navigator window.
Comment 3 Milutin Kristofic 2015-09-08 13:05:55 UTC
I see a slowdown, but for a few seconds. It should to be fixed but there are some weird stuff in this document, so I don't think it is P2.

The ending of document is:

</div></div></span></span></div></div></div></div></a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></body></html>

that means there is 72 nested divs. That is why navigator in csl is slow since it is recursively calculating children. 

I can see how can I speed things up with this example of recursion. But there is a release 8.1 comming next month, so I am decreasing it to P3 and I will play with this for next version