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.
Low performance of error highlighting for large sources. For example take uts project from OpenSolaris, open project, wait parsing and open file: usr/src/uts/common/dtrace/dtrace.c Waiting about 130 seconds Semantic highlighting is appeared. Waiting about 130 seconds File status is changed to processing. Waiting about 110 seconds File status is changed to error and error highlighting is appeared. So all process consumes 370 seconds. By the way, parsing time is less then 400 seconds.
Created attachment 67445 [details] status prosessing log
I would like to suggest a speed target: The highlighting should process 1000 lines of code in 1 second. If feature cannot achieve such speed we should provide another solution for the highlighting. For example: - split the highlighting process on small part. - highlight visible objects at first. - cancel the highlighting process if user change file. - do not show more then 100 errors in the file
fixing, change set: http://hg.netbeans.org/main/rev/e6c9eeca4306 - run mark occurrences in separate thread (hence mark occurrences does not wait error and semantic highlighting)
fixing: http://hg.netbeans.org/main/rev/87f3a5ae750d - make occurrences task cancellable http://hg.netbeans.org/main/rev/c53f19549c3b - do not process one file twice (if project contains links, for example MySQL, file mysql-5.0.18/client/client_priv.h)
Integrated into 'main-golden', available in build *200808260201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/e6c9eeca4306 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing: IZ#143956:low performance of error and semantic highlighting - run mark occurrences in separate thread
I turned OFF expensive (from performance point of view) features for files > 4000 lines. This can be changed by setting flag "cnd.semantic.max.line" values <0 turn OFF limitation, positive values change default 4000 lines limit to new one http://hg.netbeans.org/main?cmd=changeset;node=a5cbcb0669f3
improve performance: - get unit by unitID - MemoryCache (remove unnecessary statement on critical method) - CharSequenceKey (create special byte compare) - RepositoryUtils (remove unnecessary statements in critical methods) - CsmContext iteraror - CsmProject.findFile() in change sets: http://hg.netbeans.org/main?cmd=changeset;node=6fe91d5e38ed http://hg.netbeans.org/main?cmd=changeset;node=05c7665a5fb2 http://hg.netbeans.org/main?cmd=changeset;node=8f9f3e200169 http://hg.netbeans.org/main?cmd=changeset;node=e634d76db878 http://hg.netbeans.org/main?cmd=changeset;node=fb6e2316cb7e http://hg.netbeans.org/main?cmd=changeset;node=9e7aa3212831
Integrated into 'main-golden', will be available in build *200809060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6fe91d5e38ed User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting (get unit by unitID)
Integrated into 'main-golden', will be available in build *200809091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b5b4a57a5af4 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - cache namespace hash code - improve iteraror in a find declaration by offset
Integrated into 'main-golden', will be available in build *200809100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/459d57a44889 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - static variables and declarations are cached in resolved file context
improve performance: - use right case sensitive flag in finders in change set: http://hg.netbeans.org/main/rev/25faddecad65
Integrated into 'main-golden', will be available in build *200809101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/25faddecad65 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - use right case sensitive flag in finders
improve performance: -cache file macros -improve extract namespaces from using directives -improve extract namespaces from using directives -remove blinking of semantic highlighting -store project in weak reference in file and name space -make repository classes final -fix slice hash in memory cache in change sets: http://hg.netbeans.org/main?cmd=changeset;node=903af397a1b0 http://hg.netbeans.org/main?cmd=changeset;node=f23e92462889 http://hg.netbeans.org/main?cmd=changeset;node=ffe1a0471f6f http://hg.netbeans.org/main?cmd=changeset;node=e25960dae3a6 http://hg.netbeans.org/main?cmd=changeset;node=04d64ff7ec63 http://hg.netbeans.org/main?cmd=changeset;node=ca315a4731bd
Problem was fixed: Highlighting of source 4000-lines file consumes about 10 seconds. Field/method semantic and error highlighting for huge files (bigger then 4000 lines) is switched off.
Integrated into 'main-golden', will be available in build *200809111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/903af397a1b0 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - cache file macros
Integrated into 'main-golden', will be available in build *200809120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/04d64ff7ec63 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - store project in weak reference in file and name space - make repository classes final
Integrated into 'main-golden', will be available in build *200809121401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/91bf32cd1181 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing IZ#143956:low performance of error and semantic highlighting - remove running init task from constructor of highlighter because it will be invoked later in other thread