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.

Bug 201196 - AnnotationModelHelper$ClassIndexListenerImpl.typesChanged slows down scan
Summary: AnnotationModelHelper$ClassIndexListenerImpl.typesChanged slows down scan
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2011-08-21 23:06 UTC by zorro2b
Modified: 2016-07-07 08:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profile of ide (39.20 KB, application/octet-stream)
2011-08-21 23:06 UTC, zorro2b
Details
messages log file (15.78 KB, application/x-zip-compressed)
2011-08-21 23:07 UTC, zorro2b
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zorro2b 2011-08-21 23:06:58 UTC
Created attachment 110122 [details]
profile of ide

If I have more than 2-3 projects open, Netbeans regularly disappears into scanning projects forever. This makes the ide extremely unusable.

I have tried increasing the max memory for the JVM to 2G from the 768M it was allocating itself on startup. This does not appear to have helped.

I have netbeans and my source all on an SSD so I would expect it to be extremely fast.

All my projects are Maven projects in case that has any bearing on the problem.

JVM:
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Comment 1 zorro2b 2011-08-21 23:07:28 UTC
Created attachment 110123 [details]
messages log file
Comment 2 Tomas Zezula 2012-05-11 12:08:26 UTC
According to attached nps file the scan time is spent in the AnnotationModelHelper$ClassIndexListenerImpl.typesChanged(). This listener eagerly creates and resolves all types with a new parser. The listener should not be eager but lazy.
Maybe already fixed as I remember that Denis did some fixes in this area.
Comment 3 Petr Jiricka 2012-10-22 09:59:30 UTC
Denis, can you comment?
Comment 4 Denis Anisimov 2012-10-22 10:43:41 UTC
(In reply to comment #2)
> According to attached nps file the scan time is spent in the
> AnnotationModelHelper$ClassIndexListenerImpl.typesChanged(). This listener
> eagerly creates and resolves all types with a new parser. The listener should
> not be eager but lazy.
> Maybe already fixed as I remember that Denis did some fixes in this area.

AnnotationModelHelper$ClassIndexListenerImpl is a generic implementation for
any annotation based j2ee metamodel. I haven't changed class index based types
update functionality.

> The listener should not be eager but lazy.
I don't understand what it means. Could you please clarify what you meant ?
Comment 5 Petr Jiricka 2013-07-24 08:31:15 UTC
Tomas, can you please answer Denis's question?

Not sure if this is still an issue, or if this can be closed.
Comment 6 Tomas Zezula 2013-07-24 09:28:08 UTC
Everything is already written in comment #2 and snapshot attached in comment #1. 
This listener eagerly creates and resolves all types with a new parser. Simply the listener should not load the jx.l.m.Elements unless it really needs them which is not the case.
Definitely it should not be closed if it was not resolved yet.
Comment 7 Martin Balin 2016-07-07 08:55:27 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss