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 59721 - Annotations in error stripe does not scale
Summary: Annotations in error stripe does not scale
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords: PERFORMANCE
: 65128 (view as bug list)
Depends on: 66470
Blocks: 55639
  Show dependency tree
 
Reported: 2005-06-08 09:42 UTC by _ pkuzel
Modified: 2007-01-04 17:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2005-06-08 09:42:43 UTC
Annotation.attach(Annotatable):

  639 annotations attached in 9512ms.
  308 annotations attached in 3346ms.
  148 annotations attached in 541ms.
   79 annotations attached in 49ms.
   49 annotations attached in 79ms.
   36 annotations attached in 164ms.

(on 2.4GHzPentium)

Probably caused by errorstripe client:

        at org.netbeans.editor.BasePosition.getOffset(BasePosition.java:41)
        at org.netbeans.editor.LineElement.getStartOffset(LineElement.java:69)
        at
org.netbeans.lib.editor.util.swing.GapBranchElement.getElementIndex(GapBranchElement.java:92)
        at
org.netbeans.editor.LineRootElement.getElementIndex(LineRootElement.java:254)
        at org.netbeans.editor.Utilities.getLineOffset(Utilities.java:555)
        at
org.netbeans.modules.editor.NbEditorDocument$AnnotationDescDelegate.getLine(NbEditorDocument.java:351)
        at
org.netbeans.editor.Annotations$LineAnnotations.getLine(Annotations.java:877)
        at org.netbeans.editor.Annotations.getLineAnnotations(Annotations.java:363)
        at org.netbeans.editor.Annotations.getActiveAnnotation(Annotations.java:378)
        at
org.netbeans.modules.editor.errorstripe.annotations.AnnotationMarkProvider.getAnnotationsForLineImpl(AnnotationMarkProvider.java:79)
        at
org.netbeans.modules.editor.errorstripe.annotations.AnnotationMarkProvider.createMarks(AnnotationMarkProvider.java:96)
        at
org.netbeans.modules.editor.errorstripe.annotations.AnnotationMarkProvider.changedAll(AnnotationMarkProvider.java:123)
        - locked <0x4987a458> (a
org.netbeans.modules.editor.errorstripe.annotations.AnnotationMarkProvider)
        at
org.netbeans.modules.editor.errorstripe.annotations.AnnotationMarkProvider.changedLine(AnnotationMarkProvider.java:117)
        at org.netbeans.editor.Annotations.fireChangedLine(Annotations.java:555)


Please employ some sort of batching, etc.
Comment 1 Antonin Nebuzelsky 2005-06-08 12:42:27 UTC
The numbers attached by pkuzel look veeery bad.
Comment 2 _ pkuzel 2005-06-08 15:51:53 UTC
Without errostripe I'm getting (message comes from CVS support module):

#59721 should be reopened: 573 of 729 annotations attached in 705ms. Setting
performance limit.
Comment 3 Roman Strobl 2005-08-15 15:33:05 UTC
Honzo, will you take a look at this or should this issue be assigned to somebody
else? Sorry for bothering but it's a P2.
Comment 4 Martin Matula 2005-08-18 16:42:05 UTC
Honzo, please look at it.
Comment 5 Jan Lahoda 2005-08-31 12:47:36 UTC
The error stripe has been rewritten and the scalability (of handling annotations
in the error stripe) should have been vastly improved.
Comment 6 Antonin Nebuzelsky 2005-08-31 12:55:58 UTC
Petre, could you please remeasure the cases you mentioned at the beginning of
this issue with the new errorstripe implementation? It would be nice to have
exact comparison to the old numbers.... Thanks.
Comment 7 Jan Lahoda 2005-08-31 13:00:11 UTC
One more note: if possible, please try to do the measurements with errorstripe
module enabled&disabled to see the difference.
Comment 8 _ pkuzel 2005-08-31 13:20:52 UTC
Trap is in code. It creates log if slow.
Comment 9 Jan Pokorsky 2005-09-13 16:23:33 UTC
I read in my console the following message to reopen this issue. 

#59721 should be reopened: 98 of 186 annotations attached in 711ms. Setting
performance limit.

Most likely triggered by the cvs annotation action.
Comment 10 Jan Lahoda 2005-09-14 09:21:52 UTC
I did some quick tests with and without the error stripe. With errorstripe, the
report was:
#59721 should be reopened: 120 of 951 annotations attached in 705ms. Setting
performance limit.

Without errorstripe, the report was:
#59721 should be reopened: 126 of 951 annotations attached in 704ms. Setting
performance limit.

So it seems to me that the difference caused by the errorstripe is insignificant
and the main problem is somewhere else. Someone in the editor please evaluate.
Comment 11 Miloslav Metelka 2005-09-27 13:53:36 UTC
If the errorstripe is not the cause of the problem then I'm reassigning to
javacvs client which is the only other client known to me that attaches a big
number of anntotations. Please check what's the count of the annotations
attached by javacvs and please have in mind that even if you deattach the
particular annotation its corresponding DocumentLine instance (to which the
annotation is attached) is likely still active and held in PositionRef.Manager
in CloneableEditorSupport.
Comment 12 _ pkuzel 2005-09-27 16:06:19 UTC
I'll try to profile current annotation framework.
Comment 13 _ pkuzel 2005-10-11 13:08:56 UTC
In issue #66470 I have raised friend ErrorStripe SPI request. It addresses core
problem causing this issue (offset -> linenum -> Line -> new Annotation ,...).
Comment 14 _ pkuzel 2005-10-13 17:09:35 UTC
FIXED 
Introduced implementation dependecy on ErrorStripe bypassing Annotations API:

RCS file:
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkProvider.java,v
done
Checking in
src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkProvider.java;
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkProvider.java,v
 <--  AnnotationMarkProvider.java
initial revision: 1.1
done
RCS file:
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkInstaller.java,v
done
Checking in
src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkInstaller.java;
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMarkInstaller.java,v
 <--  AnnotationMarkInstaller.java
initial revision: 1.1
done
Checking in
src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationBar.java;
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationBar.java,v
 <--  AnnotationBar.java
new revision: 1.24; previous revision: 1.23
done
RCS file:
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMark.java,v
done
Checking in
src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMark.java;
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/annotate/AnnotationMark.java,v
 <--  AnnotationMark.java
initial revision: 1.1
done
Checking in nbproject/project.xml;
/shared/data/ccvs/repository/javacvs/cvsmodule/nbproject/project.xml,v  <-- 
project.xml
new revision: 1.13; previous revision: 1.12
done
Checking in src/org/netbeans/modules/versioning/system/cvss/resources/layer.xml;
/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/resources/layer.xml,v
 <--  layer.xml
new revision: 1.15; previous revision: 1.14
done
Checking in deps.txt;
/shared/data/ccvs/repository/ide/golden/deps.txt,v  <--  deps.txt
new revision: 1.225; previous revision: 1.224
done
Comment 15 _ pkuzel 2005-10-13 17:16:31 UTC
*** Issue 65128 has been marked as a duplicate of this issue. ***
Comment 16 _ pkuzel 2005-10-17 13:59:14 UTC
FIXED