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 43546 - IDE hangs when opening 10 java files
Summary: IDE hangs when opening 10 java files
Status: CLOSED DUPLICATE of bug 43484
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: PERFORMANCE, REGRESSION, T9Y
Depends on:
Blocks:
 
Reported: 2004-05-19 13:22 UTC by Marian Mirilovic
Modified: 2008-12-22 20:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Big file for test (192.39 KB, application/octet-stream)
2004-05-19 13:22 UTC, Marian Mirilovic
Details
attachment 1 - after slelection 7-8 files (25.08 KB, text/plain)
2004-05-19 13:23 UTC, Marian Mirilovic
Details
attachment 2 - after opening 10 big files (12.38 KB, text/plain)
2004-05-19 13:24 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2004-05-19 13:22:17 UTC
[nb_dev](200405182245),[jdk1.5.0](b51)

Steps to reproduce:
- run IDE
- make 10 copies of attached file to the same package
- try to select one by one of copied files in
Projects View (select first - CTRL+right click,
select second - CTRL+right click, ......)
- push Open from popup menu on multiselection
-> IDE hangs if you have selected 7 -8 files
(attachment 1 [details]) or after trying to open (attachment 2 [details])
Comment 1 Marian Mirilovic 2004-05-19 13:22:55 UTC
Created attachment 14992 [details]
Big file for test
Comment 2 Marian Mirilovic 2004-05-19 13:23:41 UTC
Created attachment 14993 [details]
attachment 1 [details] - after slelection 7-8 files
Comment 3 Marian Mirilovic 2004-05-19 13:24:18 UTC
Created attachment 14994 [details]
attachment 2 [details] - after opening 10 big files
Comment 4 Marian Mirilovic 2004-05-19 13:29:46 UTC
By the way:
- it's regression !!!! - it works fine in previous build 200405171800 !!!!
- it's reproducible on all platforms WinXP,Win2K,RH9,Sol9
- this test case is very important from performance point of view and
it's one of the test cases used for testing performance of our IDE
Comment 5 Miloslav Metelka 2004-05-19 15:42:47 UTC
Excerpt:
org.openide.text.DocumentLine$Set.getLines(DocumentLine.java:865)
org.netbeans.modules.debugger.projects.ContextProviderImpl.getCurrentLineNumber(ContextProviderImpl.java:131)
org.netbeans.modules.debugger.jpda.ui.Context.getCurrentLineNumber(Context.java:106)
org.netbeans.modules.debugger.jpda.ui.actions.ToggleBreakpointActionProvider.propertyChange(ToggleBreakpointActionProvider.java:43)


The problem is apparently in a call to
org.openide.text.DocumentLine$Set.getLines() performed by the
debugger. The getLines() method iterates through all the line numbers
in the document and requests creation of a Line instance for each of
them. This will definitely be very slow for larger documents.
 To be honest I don't know whether I should pass this to the debugger
or openide/editor. The method should not be used or its implementation
should be improved if possible. Passing to openide/editor for further
evaluation.

Comment 6 Jan Lahoda 2004-05-19 15:44:46 UTC
Very probably duplicate of Issue #43484.
Comment 7 _ ttran 2004-05-19 23:24:48 UTC
yes it is a duplicate

*** This issue has been marked as a duplicate of 43484 ***
Comment 8 Marian Mirilovic 2004-06-14 14:31:47 UTC
verified duplicate