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 60304 - Unnecessary fills of code folding bar
Summary: Unnecessary fills of code folding bar
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All Mac OS X
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-06-21 02:23 UTC by _ tboudreau
Modified: 2007-11-05 13:44 UTC (History)
0 users

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 _ tboudreau 2005-06-21 02:23:52 UTC
Noticable on macintosh:  Scroll the editor with the mouse wheel, quickly, over a large file.  You will see 
the code folding bar get painted once with the gray window background color, and then overpainted 
with its contents.  This definitely slows down scrolling.
Comment 1 Martin Roskanin 2005-06-30 09:28:36 UTC
Code folding side bar signs are painted. It is not image, because the signs need
to be resized in accordance with fontsize change. The fill if required for side
bar background coloring. The same mechanism is used also in glyph gutter. There
is only one repaint operation call during one scroll. Fill operation is not time
consuming. CodeFoldingSideBar just overrides JComponent.paintComponent, where in
parent paintComponent method is also filling the component with background color.
I am closing this as wontfix.
Comment 2 _ tboudreau 2005-07-01 05:27:46 UTC
Then override Component.update() to do nothing - what's happening is, when scrolling on mac-os, it is 
flushed twice - once with gray, and again with the background color.  It looks very bad, and it definitely  
does affect performance when paints are being flushed direct to the screen (no double buffering) when 
scrolling.  When not scrolling, I agree with you, it's no big deal.
Comment 3 Martin Roskanin 2005-07-01 08:05:12 UTC
Unfortunatelly I cannot reproduce the problem. But I have overriden
Component.update() to do nothing as you suggested. (BTW, on winXP the method
"update" is never called during scrolling or painting.) But perhaps this vary on
OS and causes problem on Mac. Could you please verify the fix? Thanks.

/cvs/editor/libsrc/org/netbeans/editor/CodeFoldingSideBar.java,v  <-- 
CodeFoldingSideBar.java
new revision: 1.23; previous revision: 1.22