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.
Hi, when opening a file for the first time, the highlighter takes a long time to finish (until the green/yellow/red square shows up). This could be a combination of problems, highlighter + parsing speed, or a standalone issue with the highlighter... Thanks, Rolando
Rolando, Do you mean the first file only? I.e. when for the first file box is green, try to open the next file. Is green state appears faster? Or the same speed as the first file? (There is some activity for initial building of "overriden/override" annotations which can be the reason)
Hi Vladimir, They have the same speed as the first file. (but if you close a file and re-open it, there is no delay) Thanks, Rolando
Hi Rolando, I have changed the order of highlighters and now "overriden/override" has the lowest priority => I can not reproduce the issue. Can you tell me the name of file in ace+tao where you see slowness now and reopen the bug? http://hg.netbeans.org/cnd-main?cmd=changeset;node=0c1abe1e8a61
Hi Rolando, I think your problem was (I have checked on cold system) - opening ACE+TAO from repository - open TestS.cpp file => it takes 37 sec (under profiler) to highlight fields (macros are highlighted after 7 sec) as I see in profiler: - for the first time we spend the most time in reading repository - reading included files - Macros HL itself: org.netbeans.modules.cnd.highlight.semantic.ModelUtils.getMacroBlocks(CsmFile) 7 sec (includes read of all included files) - other Semantic HL: org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.update(BaseDocument, CsmReferenceRepository$Interrupter) 30 sec where 20 sec are spent in repository: org.netbeans.modules.cnd.modelimpl.repository.RepositoryUtils.get(Key) 20 sec HLing the second file is much faster (< 1 sec)
We can not do anything with I/O opening from repository except... - put repository into RAM based disk (i.e. on Solaris and Ubuntu /tmp is mounted to swap which is in RAM) start nb with -J-Dcnd.repository.cache.path="/tmp/cnd/cache" to check if it can help + we are thinking to load cache on startup into memory mapped file => no need for redirecting as I propose above + /tmp is cleaned on restart of system, while usual place where userdir is kept - not => cache is kept vs. full reparse of project after restarting OS.
Created attachment 98214 [details] Profile with tmp on disk
Created attachment 98215 [details] Profile with tmp on ramdisk
*** Bug 108853 has been marked as a duplicate of this bug. ***
Rolando, can you attach nps files, not xml Thanks! Vladimir
Created attachment 98253 [details] disk profile
Created attachment 98254 [details] on ram disk
(In reply to comment #11) > Created an attachment (id=98254) [details] > on ram disk Parsing is not yet finished in this snapshot
Created attachment 98283 [details] proper on ram disk
Created attachment 98286 [details] profile parsing project - ram disk