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.
Summary: | slow initial indexing of C++ project | ||
---|---|---|---|
Product: | editor | Reporter: | Vladimir Voskresensky <vv159170> |
Component: | Parsing & Indexing | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | rmartins |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | the idea is to get mime-type info somewhere else, not by expensive creating of snapshot |
Description
Vladimir Voskresensky
2009-07-20 14:40:03 UTC
Well, it's again the very expensive creation of useless snapshots. I will attach the patch which speeds up initial indexing 3x times Created attachment 84934 [details]
the idea is to get mime-type info somewhere else, not by expensive creating of snapshot
with the proposed change time is improved from Complete indexing of 3 source roots took: 149192 ms to Complete indexing of 3 source roots took: 43312 ms Hi Vladimir. It looks like this issue is already fixed in trunk. Can you check it? Or do you want to fix it in some other branch? Hi, Jan. Vita have changed files crawling and closed issue 166340 with the request to open new one if we find the problem again. I have checked the influence of fixes of issue 166340 and found that initial scanning phase is still very very slow (as you can see 150 sec :-( ). I have checked it in trunk version of cnd-main repository => I have profiled the problematic scanning and found that fixing issue 166340 introduced creation of non-used snapshot (very expensive) for the only reason of detecting mime-type => I have changed it in the proposed patch. Btw, I have checked your trunk as well http://hg.netbeans.org/jet-main/file/tip/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java and I see that the issue exists (see line 1303). So, I have checked it :-) Yes, but last Vita's change fo RepositoryUpdater is opposite to your patch: http://hg.netbeans.org/jet-main/diff/f22eac907102/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java So, I am confused. I will reassign this issue to Vita. He should be back soon. Oh, I see. That explains, why before Vita's optimization I have seen 3x speed up and after the fix initial scan became slow again. So, as result the improvement was only with "up-to-date" check and nothing was changed in initial scan phase Integrated into 'main-golden', will be available in build *200907230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/59600af3ff86 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fix for IZ#168817: slow indexing of C++ project - do not create snapshots to obtain mime-type information only Unfortunately, Vladimir's http://hg.netbeans.org/main-golden/rev/59600af3ff86 is not correct. The mime type has to be taken from the snapshot otherwise indexing is not going to work in embedded scenarios. I'll have a closer look and try to come up with a correct solution that would improve situation for cnd. In the meantime I'm going to backout 59600af3ff86. Oh, I've now seen http://hg.netbeans.org/main-golden/rev/b4073f9088e6, which reverts 59600af3ff86. Thanks Vladimir Vita, thanks for the evaluation. I expected that it might be incorrect in general case... Can we enhance ResultIterator with getMimeType to prevent creating of snapshost only for getting mime type? This should fix the problem - http://hg.netbeans.org/jet-main/rev/c633b15a60d9 - even though I was not able to see 3x improvement reported by Vladimir. I generally seem to be getting much higher numbers than Vladimir. Vladimir, could you please remeasure this again and either confirm the fix or reopen this issue? Thanks Hello, Vita, Ok. I will check tomorrow (and profile further if needed). Btw, do you know that you can turn off parsing part of C++ project (and leave only scanning phase) in project's context menu Code Assistance->C/C++ Code Assistance Integrated into 'main-golden', will be available in build *200907240201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c633b15a60d9 User: Vita Stejskal <vstejskal@netbeans.org> Log: #168817: do not attempt to parse snapshots of files that have no EmbeddingIndexer "Btw, do you know that you can turn off parsing part of C++ project" - Neat, thanks. Now I know :-). verified Complete indexing of 3 source roots took: 43223 ms I see the speedup, thanks! |