[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/24871] New: Poor JTree painting performance
From: |
roman at kennke dot org |
Subject: |
[Bug swing/24871] New: Poor JTree painting performance |
Date: |
15 Nov 2005 09:33:24 -0000 |
Hi Lillian,
I notice that the painting performance of JTree breaks down when the tree has a
certain size. The reason is that the JTree is painted as a whole, regardless of
the current clip setting. This should really be improved because JTree is
nearly not usable with bigger trees. This is especially important when used
inside a JScrollPane, because when scrolling, usually only a thin line of some
pixels must be repainted, the remainder is simply copied by the JViewport
painting mechanism.
However, I think in order to achieve this, you need to rework the JTree
painting a little. At the moment the painting is performed recursivly, this
seems wrong to me. This should really be implemented in a non-recursive way.
Then we could do something like this:
int startIndex = tree.getRowForLocation(clip.x, clip.y);
int endIndex = tree.getRowForLocation(clip.x + clip.width, clip.y
+clip.height);
int current = startIndex;
while (current <= endIndex)
// Perform painting....
I think you are most familiar with this area, so I assign the bug to you.
--
Summary: Poor JTree painting performance
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: swing
AssignedTo: langel at redhat dot com
ReportedBy: roman at kennke dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24871
- [Bug swing/24871] New: Poor JTree painting performance,
roman at kennke dot org <=