Re: Drawing 25 000 Shape fast
- From: MTP <mtp@xxxxxxxxxxxxxxx>
- Date: Thu, 13 Jul 2006 18:07:56 +0200
Andrey Kuznetsov a écrit :
i have to render 25 000 "points" with each one a specific fill color, and a specific Shape (java.awt.Shape or customized) in a JPanel.
Drawing every Shape, one by one, is too slow (panning the view ins't smooth). So i tried to create a BufferedImage for each point, and render them instead. But it is even slower.
Direct : 3 sec
BI: 4.5 sec
I need to reach 0.1 sec by any mean. Right now i'm thinking to add some kind of Z-buffer but with aliasing it's pretty hard i think. Trying ideas take time so i'm asking if somebody can help me.
And all the BI take about 60 Mbytes of memory, which is a lot.
use one BufferedImage.
You need to draw your shapes to BI only if something changes.
I already use this. But it's unusable if one of these events happen:
- pan (let's say that i'm at Zoom Factor 2000)
- zoom
- resize
- the user want to map column 3 instead of column 4 for colors OR size of the shape OR type of shape
.
- Follow-Ups:
- Re: Drawing 25 000 Shape fast
- From: Larry Barowski
- Re: Drawing 25 000 Shape fast
- From: Oliver Wong
- Re: Drawing 25 000 Shape fast
- References:
- Drawing 25 000 Shape fast
- From: MTP
- Re: Drawing 25 000 Shape fast
- From: Andrey Kuznetsov
- Drawing 25 000 Shape fast
- Prev by Date: Re: Drawing 25 000 Shape fast
- Next by Date: Re: Auto Select text on textfield focus
- Previous by thread: Re: Drawing 25 000 Shape fast
- Next by thread: Re: Drawing 25 000 Shape fast
- Index(es):
Relevant Pages
|
|