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 218534 - Task list indexing slow due to slow html parsing; was: java.lang.Exception: Scan canceled.
Summary: Task list indexing slow due to slow html parsing; was: java.lang.Exception: S...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on: 227107
Blocks: 226277
  Show dependency tree
 
Reported: 2012-09-18 12:41 UTC by Exceptions Reporter
Modified: 2013-05-11 02:32 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 192528


Attachments
stacktrace (2.57 KB, text/plain)
2012-09-18 12:41 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-09-18 12:41:45 UTC
This issue was reported manually by sdedic.
It already has 3 duplicates 


Build: NetBeans IDE 7.2 (Build 201207171143)
VM: Java HotSpot(TM) Client VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b06
OS: Linux

User Comments:
GUEST: coding php and html. 2 small projects and 1 large project is open.




Stacktrace: 
java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(Thread.java:0)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:113)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:106)
   at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.fileChangedImpl(RepositoryUpdater.java:779)
   at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$5800(RepositoryUpdater.java:139)
   at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FCL.fileChanged(RepositoryUpdater.java:5765)
Comment 1 Exceptions Reporter 2012-09-18 12:41:49 UTC
Created attachment 124509 [details]
stacktrace
Comment 2 Tomas Zezula 2012-09-18 13:02:10 UTC
Belongs to html.
Comment 3 Svata Dedic 2012-09-18 13:06:59 UTC
Short notes from log inspection


606077 - indexing HTML. Many absorbed changes in logfiles, possibly user misconfiguration ?
601865 - HTML validation, 145secs
581022 -- html parser
Comment 4 Marek Fukala 2012-09-18 13:42:54 UTC
I'm sorry I didn't realize that this is kind of performance test. I'll take a look at the logged data.
Comment 5 Marek Fukala 2012-09-19 13:07:15 UTC
the HtmlIndexer should be now very much faster.

changeset:   233448:d2c9025d0e8f
summary:     #218534 - performance optimalization - HtmlFileModel doesn't trigger the html file parsing, it uses cached plain elements iterator instead.

however the TLIndexer problem still remains - it really requires the file to be parsed to find the errors.
Comment 6 Marek Fukala 2012-09-19 13:34:13 UTC
As for the task list indexer I'm afraid I see just three options:

a) either to speed up the html parser significantly (very hard as it is third party code)

b) do not show the html errors/warnings in the task list

c) implement (or get) some lightweight html parser providing some reasonable error analysis. (quite complicated and IMHO the speed will incline to the html.parser speed)
Comment 7 Quality Engineering 2012-09-20 02:26:37 UTC
Integrated into 'main-golden', will be available in build *201209200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d2c9025d0e8f
User: Marek Fukala <mfukala@netbeans.org>
Log: #218534 - performance optimalization - HtmlFileModel doesn't trigger the html file parsing, it uses cached plain elements iterator instead.
Comment 8 Svata Dedic 2013-05-02 12:54:10 UTC
Short-term (before I can come up with a better API in CSL), I propose to stop computing hints/errors from TLIndexed - IF the task list is not visible. I can call ErrorFilter.Factory with a different 'featureName' parameter, which causes HTML implementation to return null - and no time-consuming HTML hint will be run during background scanning.

The drawback is that if the user displays the tasklist, the TLIndexer will be re-run again.
Comment 9 Svata Dedic 2013-05-10 11:36:15 UTC
Implemented in rev http://hg.netbeans.org/jet-main/rev/f59bc9fc4cea
Comment 10 Quality Engineering 2013-05-11 02:32:25 UTC
Integrated into 'main-golden', will be available in build *201305102300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f59bc9fc4cea
User: Svata Dedic <sdedic@netbeans.org>
Log: #218534: changed processing of errors into tasks so that only error badges are generated when tasklist is not visible