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: | OOME when need to index larger amount of sources | ||
---|---|---|---|
Product: | ruby | Reporter: | Martin Krauskopf <mkrauskopf> |
Component: | Editing | Assignee: | Erno Mononen <emononen> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | pjiricka |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Martin Krauskopf
2009-01-28 09:59:48 UTC
PS: seems it started to happen few days (5+/-) ago. *** Issue 154870 has been marked as a duplicate of this issue. *** The problem was in RubyIndexer and related code. It was opening editor documents when indexing files, the reason for that was that it needed access to the lexer tokens for the indexed file. This can be now achieved by lexing snapshots. Opening editor documents is very expensive, because they are designed to support full-featured editing and so will initialize tons of stuff that is just not needed for indexing (eg. coloring, hints, etc) With the following fix it's possible to index all ruby platform/gems/etc bundled stuff within 128m memory and in reasonable time (~ 10sec). I would recommend all the other CSL based languages to review what their indexers do and use Snapshot.getTokenHierarchy() whenever they need lexer tokens and don't have a document. The current approach was to forcibly open the document, get its token hierarchy and then carry on. But this approach is flawed and leads to performance problems. http://hg.netbeans.org/jet-parsing-api/rev/02b15aca7832 The fix is in jet-parsing-api. Integrated into 'main-golden', will be available in build *200903170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/02b15aca7832 User: Vita Stejskal <vstejskal@netbeans.org> Log: #157533: preferring Snapshot over Document when indexing (eg. it significantly reduces the amount of memory needed for indexing and increases speed) |