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: | Javascript parser errors indirectly refers to their parser result and snapshot which causes OOM during tasklist indexing | ||
---|---|---|---|
Product: | javascript | Reporter: | Marek Fukala <mfukala> |
Component: | Editor | Assignee: | Marek Fukala <mfukala> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jlahoda, mmirilovic |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Marek Fukala
2011-03-09 13:14:48 UTC
Since there might always be a parser result producing Error instancies with some extensive objects map attached to the parameters field the error cannot be simply fixed at the JS side. The only proper way how to fix this problem securely is not to pass the org.netbeans.modules.csl.api.Error instancies directly to the ErrorsCache.setErrors() but use an artificial object which holds the minimum information required by showing the error in the tasklist. This introduces a smaller memory overhead since some of the error's fields needs to be cloned, but it is much better than holding some errors with megabytes of object attached to them. fixed in web-main#c9421f66dbba Honzo, can you please review the change so I can put it to 7.0? Thanks The patch seems fine to me, thanks. Note that the idea is that TLIndexer's errors map should contain errors only from one file. (In reply to comment #2) > The patch seems fine to me, thanks. Note that the idea is that TLIndexer's > errors map should contain errors only from one file. ??? private static final Map<Indexable, Collection<SimpleError>> errors = new IdentityHashMap<Indexable, Collection<SimpleError>>(); Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c9421f66dbba User: Marek Fukala <mfukala@netbeans.org> Log: #196490 - Javascript parser errors indirectly refers to their parser result and snapshot which causes OOM during tasklist indexing fixed in 7.0 http://hg.netbeans.org/releases/rev/c9421f66dbba |