Drawing 25 000 Shape fast



Hello,

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.

Thanks for any help
.



Relevant Pages

  • Re: Some help with System.Drawing Part 1.
    ... My suggestion of pre-creating the paths will cause a slow down at the time that the application runs, this is probably what you see most of, but once the data is loaded, the performance will be better as long as you're filling polygons and not drawing paths. ... public void Draw(string grid, Graphics graphics, LayerEngine ... Now that I have my ActiveGrids I loop through each grid and render the ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Some help with System.Drawing Part 1.
    ... I have the idea that you can make all of your tiles a solid polygon by nominating some point that is on either sea or land and making the system close the polygon with a single point that references the most inland point of the tile. ... The next time you come to draw this grid, see if it's already in the hashtable and use the already created GraphicsPath. ... drawing system will do some pretty efficient clipping for you too. ... Now that I have my ActiveGrids I loop through each grid and render the ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Some help with System.Drawing Part 1.
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... drawing system will do some pretty efficient clipping for you too. ... I've broken the data down into 36x18 grids (or ... Now that I have my ActiveGrids I loop through each grid and render the ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Some help with System.Drawing Part 1.
    ... Regarding the creation and destruction of the GraphicsPath objects, ... public void Draw(string grid, Graphics graphics, LayerEngine ... drawing system will do some pretty efficient clipping for you too. ... Now that I have my ActiveGrids I loop through each grid and render the ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Some help with System.Drawing Part 1.
    ... drawing system will do some pretty efficient clipping for you too. ... I've broken the data down into 36x18 grids (or ... This gives me 648 unique segments which get ... Now that I have my ActiveGrids I loop through each grid and render the ...
    (microsoft.public.dotnet.framework.drawing)