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 113003 - performance problem while editing .yml files
Summary: performance problem while editing .yml files
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: PERFORMANCE
Depends on: 114747
Blocks:
  Show dependency tree
 
Reported: 2007-08-16 14:34 UTC by Tomas Danek
Modified: 2008-08-29 09:26 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threaddump.txt (19.14 KB, text/plain)
2007-09-04 12:40 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2007-08-16 14:34:00 UTC
i do not know where yaml files are treated, feel free to reassign to scripting.. 

20070816
-------------------------------------------
i noticed this long time ago. when i'm editing .yml file (mostly database.yml in rails), editor gets sometimes stuck for
~5-10sec. and completely stops to respond. This makes yml editing really painful. I also noticed some rendering lag-when
i make some editing in file, it takes some time to correctly render syntax highlighting.  Anyone else spotted this
behavior? 

I can generate thread dump next time editor gets stuck...
Comment 1 Tomas Danek 2007-08-16 16:38:14 UTC
i can reproduce 100% with:

- start with fresh UD
- open  some rails project (i use depot application), choose jruby
- doubleclick  database.yml node (it takes a long time to open..)
- file contains something like 

development:
 adapter: mysql
 database: depot_development
 username: someuser
 password:
 host: localhost

- put the caret (i used mouse) to the end of  host: localhost line
- push enter for newline, type  e.g. socket 
- i see only "s"...and i have to wait ~10 sec till "socket" appears

rising to P2, since i found 100% reproducible steps (at least for me)
Comment 2 Jan Jancura 2007-08-20 15:34:56 UTC
fixed in trunk:

IDE:-------------------------------------------------
IDE: [8/20/07 4:29 PM] Committing "Generic Languages Framework" started
Checking in features/DatabaseManager.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/features/DatabaseManager.java,v  <--  DatabaseManager.java
new revision: 1.5; previous revision: 1.4
done
Checking in features/SemanticHighlightsLayer.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/features/SemanticHighlightsLayer.java,v  <-- 
SemanticHighlightsLayer.java
new revision: 1.5; previous revision: 1.4
done
Checking in features/Index.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/features/Index.java,v  <--  Index.java
new revision: 1.6; previous revision: 1.5
done
Checking in ParserManagerImpl.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/ParserManagerImpl.java,v  <--  ParserManagerImpl.java
new revision: 1.37; previous revision: 1.36
done
Checking in NBSLanguageReader.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/NBSLanguageReader.java,v  <--  NBSLanguageReader.java
new revision: 1.36; previous revision: 1.35
done
Checking in EditorParser.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/EditorParser.java,v  <--  EditorParser.java
new revision: 1.4; previous revision: 1.3
done
Checking in Language.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/Language.java,v  <--  Language.java
new revision: 1.47; previous revision: 1.46
done
Checking in parser/LLSyntaxAnalyser.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/parser/LLSyntaxAnalyser.java,v  <--  LLSyntaxAnalyser.java
new revision: 1.41; previous revision: 1.40
done
IDE: [8/20/07 4:30 PM] Committing "Generic Languages Framework" finished
Comment 3 Tomas Danek 2007-08-29 15:30:02 UTC
sorry, but still reproducible (at least for the first time when file is opened)  in some fresh build.

Product Version: NetBeans IDE Dev (Build 200708290000) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System:
Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb) Userdir: /tmp/ud
Comment 4 Martin Krauskopf 2007-09-04 12:39:52 UTC
It took me more than one minute (Intel(R) Core(TM)2 CPU, T7200 @ 2.00GHz, 2GB Ram) to open database.yaml. Attaching
thread dump.
Comment 5 Martin Krauskopf 2007-09-04 12:40:40 UTC
Created attachment 48031 [details]
threaddump.txt
Comment 6 Marek Fukala 2007-09-05 13:15:30 UTC
Looking into the latest stacktrace I would say this is a duplicate of issue #114234 in particular of one of it's
dependent issue #114747 (BaseDocument should be created rather for mimeType or EditorKit instance than for kitClass). I
am sorry, but I think the fact that it took one minute is caused by running it in the profiler. In normal netbeans run
it takes about 5-10 seconds as described in the issue above => decreasing priority. Reporter, if you can reproduce the
time without profiler, feel free to upgrade to P1 again, thanks.

I am leaving the final decision (if duplicate or not) on the issue owner. I am setting at least dependency meanwhile.
Comment 7 Marek Fukala 2007-09-05 13:18:04 UTC
Please disregard the part of my comment about the profiler, the rest is valid. Thanks.
Comment 8 Martin Krauskopf 2007-09-05 13:40:06 UTC
> Reporter, if you can reproduce the time without profiler, feel free to upgrade to P1 again, thanks.
...
> Please disregard the part of my comment about the profiler, the rest is valid. Thanks.

It is true that I've run it under *debugger*. Standalone IDE is about those 10s. So really P2. Probably dupe. However
for yaml files it is enough to have 1kB.
Comment 9 Daniel Prusa 2007-09-05 13:48:35 UTC
I am also able to reproduce the problem with fresh user dir and it really takes over one minute, but I have suspicions
that, in my case, this can be influenced by my overheating Toshiba - when CPU is running on 100% for a couple of
seconds, its rate substantially slows down. When I asked Jirka Prox to reproduce the problem on his machine, the initial
opening lasted for cca 4 seconds. Martine, do you also have Toshiba with similar performance as mine has? (well, I have
just read that you run it under debugger)

Additional evaluation of the issue:
- I think the performance problem was improved for editing, editor does not get stuck for 5-10sec, I cannot reproduce
these delays. The only exception is the problem mentioned by Marek, issue #114234, this is related to languages
initialization and should appear only once.
- As for the first time file opening, a small delay is reproducible for each language supported by Schlieman, it is
caused by the language initialization. Moreover, during the one minute openings on my machine, most time is spend in
org.openide.filesystems.FileUtil.createData method, not in Schliemann code.

Decreasing priority to P2.
Comment 10 Tomas Danek 2007-09-06 14:33:12 UTC
Aren't we mixing two issues togheter -  1] delay when file is opened 2] delay when you start editing??

ad 1] - i cannot reproduce the delay with the initial file opening - it takes ~3-4 sec on my desktop
ad 2] - i *can* reproduce the delay using those steps i described. The delay is ~12sec.
Comment 11 Paul Fussell 2007-09-27 17:33:19 UTC
I notice about a 12 second delay when I start editing this file. Since it's opened first, and since the user is likely
to need to fix the password as the first thing they do, I don't think this delay is acceptable because it gives a bad
first impression of Ruby editing. Is there any way to fix this delay?
Comment 12 Daniel Prusa 2007-10-10 16:22:18 UTC
Issue 114747 has been fixed for Schliemann. Now it seems that the first time editing of .yml files is responsive. Can
someone another test it and confirm it?
Comment 13 Tomas Danek 2007-10-11 15:07:57 UTC
confirmed responsivenes, anyway i noticed that syntax coloring is changed. Agreed to mark as fixed.


Product Version: NetBeans IDE Dev (Build 200710100000)
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Userdir: /tmp/ud

Comment 14 Daniel Prusa 2007-10-11 15:12:33 UTC
Ok, thanks, changing to fixed.