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 214136

Summary: org.netbeans.modules.php.dbgp.annotations.BrkpntAnnotation.getAnnotationType() is too expensive (LowPerformance took 20808 ms).
Product: php Reporter: Exceptions Reporter <exceptions_reporter>
Component: DebuggerAssignee: Ondrej Brejla <obrejla>
Status: RESOLVED FIXED    
Severity: normal Keywords: PERFORMANCE
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 175997
Attachments: nps snapshot

Description Exceptions Reporter 2012-06-13 13:41:26 UTC
Build: NetBeans IDE 7.1.1 (Build 201203012225)
VM: Java HotSpot(TM) Client VM, 20.6-b01, Java(TM) SE Runtime Environment, 1.6.0_31-b05
OS: Windows XP

User Comments:
GUEST: just opened NB and closed about 10 tabs that were already opened....



Maximum slowness yet reported was 20808 ms, average is 18822
Comment 1 Exceptions Reporter 2012-06-13 13:41:41 UTC
Created attachment 120786 [details]
nps snapshot
Comment 2 David Strupl 2012-10-16 15:05:01 UTC
The method 
org.netbeans.modules.php.dbgp.annotations.BrkpntAnnotation.getAnnotationType() is very expensive and is called 700x when doing undo in the editor. It takes over 70% of the overall time of the long undo operation. Please consider not doing the validity computation in getAnnotationType. Other implementations just return the type that is stored in some field ...
Comment 3 Ondrej Brejla 2012-10-22 11:01:19 UTC
Not so simple. A lot of things will have to be rewritten, because Breakpoint validity has to be checked somewhere.
Comment 4 Ondrej Brejla 2013-07-15 12:04:42 UTC
Wrong duplicate moved to issue #232704
Comment 5 Ondrej Brejla 2013-07-15 13:47:24 UTC
Fixed in web-main #c2690c968844 and #d64cdbba416c

Real-time "type" checking had to be disabled due to performance reasons (if one comments a line, where a valid BP is, it doesn't change its type to "broken" automatically. It will be still displayed as "valid" but will not work. Same behavior is in Java editor.).
Comment 6 Quality Engineering 2013-07-16 02:37:28 UTC
Integrated into 'main-silver', will be available in build *201307152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c2690c968844
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #214136 - org.netbeans.modules.php.dbgp.annotations.BrkpntAnnotation.getAnnotationType() is too expensive (LowPerformance took 20808 ms).