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 203118 - ide hangs when opening a qooxdoo generated js file
Summary: ide hangs when opening a qooxdoo generated js file
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.1
Hardware: PC Linux
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 202183 205975 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-05 08:30 UTC by antonx
Modified: 2011-12-06 12:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
if you open this file nb hangs (104.34 KB, text/x-js)
2011-10-05 08:30 UTC, antonx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description antonx 2011-10-05 08:30:04 UTC
Created attachment 111507 [details]
if you open this file nb hangs

Hi I use: netbeans-dev-201110030601

on Suse Linux 11.4, 64 bit 

with java: 

  java version "1.6.0_26"
  Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
  Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode


If I try to open the sample js file which I uploaded,
the ide hangs (even the issue reporting doesnt work since netbeans
uses 1.7 GB and is alwasy at 100% cpu load).

On netbeans 7.0.1 it works.

By the way: is there any hope that the javascript support will improve
in the future?

I am missing a configurable formatter (like for php or java,
where I can set my formatting style to be conform with my coding styles).
Comment 1 Petr Pisl 2011-10-06 06:44:20 UTC
The ide doesn't freeze. There is a problem with painting very, very long lines. Unfortunately such line is at the beginning of the attached file. It's painting issue in editor infrastructure.
Comment 2 antonx 2011-10-06 07:44:28 UTC
(In reply to comment #1)
> The ide doesn't freeze. There is a problem with painting very, very long lines.
> Unfortunately such line is at the beginning of the attached file. It's painting
> issue in editor infrastructure.

OK but this must be new in 7.1 since 7.0.1 works (ok it takes its time too).

The problem I had additionally: 

I killed my netbeans since in my case it didn't react anymore.

When I restarted netbeans, it seems that the "scanning files" job,
and this painting job interfere each other... after 5 min I killed netbeans
and I went back to 7.0.1 (since I didn't find the place where netbeans
remembers the last opened files, to be able to remove this js file)
Comment 3 Miloslav Metelka 2011-10-17 09:37:00 UTC
Longest line 15 has 69646 characters.
Well, the gedit freezes as well ;-) but I will attempt to improve the NB editor performance as much as possible. I will probably have to implement view's TextLayout retaining (originally wanted to postpone into 7.2) into 7.1.
Comment 4 Miloslav Metelka 2011-10-18 09:20:16 UTC
*** Bug 202183 has been marked as a duplicate of this bug. ***
Comment 5 David Strupl 2011-10-30 21:14:48 UTC
Quick fix for 7.1 can also be to just refuse to open such file - Mariane, what do you think?
Comment 6 Marian Mirilovic 2011-10-31 08:08:53 UTC
(In reply to comment #5)
> Quick fix for 7.1 can also be to just refuse to open such file - Mariane, what
> do you think?

I Agree.
Comment 7 yuriy_lalym 2011-11-04 18:38:19 UTC
NotePad++ (Windows 7) - opens for a fraction of a second without special loading on the processor.
textedit (Qt Demos, Linux) - even faster.

gedit/kwrite/kate - it is possible to have time to sleep, comparing with them is incorrect.
Comment 8 Petr Pisl 2011-11-24 12:43:05 UTC
This is not rarely case. We now about this for longer time. Many Js files have minimal new lines due to increasing loading speed. If you open such file in editor, the ide doesn't freeze but needs long (very long) time to repaint the line with thousands chars. If such line is out of the view area, everything is ok. But if the long line is in the view area after opening the file, the ide doesn't respond for seconds.
Comment 9 Miloslav Metelka 2011-11-24 16:35:19 UTC
Fix that I work on should address the long-line problem both in line-wrapping and non wrapping mode. Unfortunately I still work on stabilization of the fix so it will be ready for RC2 (not RC1).
Comment 10 Marian Mirilovic 2011-11-25 07:59:28 UTC
(In reply to comment #9)
> Fix that I work on should address the long-line problem both in line-wrapping
> and non wrapping mode. Unfortunately I still work on stabilization of the fix
> so it will be ready for RC2 (not RC1).

Ok
Comment 11 Miloslav Metelka 2011-11-29 13:27:01 UTC
The fix spans 23 files and I still work on its stabilization but the RC2 is near. Therefore I've extracted a part of the fix that resolves the long-line problem in case Line Wrap is off (Tools->Options->Editor->Formatting->Line Wrap option).
 I will commit the complete fix in terms of issue 203827 in a nearest patch release.
 I would like to ask QE for testing of the patch. Thanks.

http://hg.netbeans.org/jet-main/rev/11bcdda27acb
Comment 12 Jan Lahoda 2011-11-29 16:51:34 UTC
Hopefully OK.
Comment 13 Miloslav Metelka 2011-11-29 17:10:53 UTC
Integrated into release71:
11bcdda27acb transplanted to aac20fe32bf4
Comment 14 Quality Engineering 2011-11-30 07:12:43 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/aac20fe32bf4
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #203118 - ide hangs when opening a qooxdoo generated js file - 60KB long line problem.
(transplanted from 11bcdda27acb53865ff72b86b49af4bd4fa38aaa)
Comment 15 Quality Engineering 2011-12-01 12:10:43 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/11bcdda27acb
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #203118 - ide hangs when opening a qooxdoo generated js file - 60KB long line problem.
Comment 16 Jiri Prox 2011-12-02 14:50:37 UTC
verified
Comment 17 Miloslav Metelka 2011-12-06 12:15:22 UTC
*** Bug 205975 has been marked as a duplicate of this bug. ***