0

I'm trying to draw a interactive scatter plot with java. There are more than a million gene data to plot.

For this process I recently examined the performance of drawing(and also moving and zooming) with 30 thousands gene data by using both Processing and Piccolo. The performance were almost same or the performance with Piccolo was little better. However I wasn't satisfied with these performance. When I try to move the whole plot or zoom in/out, it took about a seconds to actually works. What I want is to show the plot in a real time.

So here is a question. Is there any other alternative library for 2D display? How about using JOGL? Do I really have to use open frameworks for this?

please give me some help.

Thanks in advance.

sehilyi
  • 17
  • 5
  • Welcome to Stackoverflow! Regardless of the library you are going to use, always [**optimize**](http://en.wikipedia.org/wiki/Program_optimization) your code and reduce your program's [**Big O Notation**](http://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/) – user2468700 Jun 19 '13 at 07:26
  • Thanks for your comment. I know that the optimization is thing that I have to care. So do you think that it will perform well with this Processing(or Piccolo) when I try to optimize the code more? – sehilyi Jun 20 '13 at 01:31
  • 1
    Definitely. A good way to start doing this is to do things like frustrum culling (skipping the rendering of objects that are not visible because they fall outside the range that is visible in the window) and eliminating the rendering of items that do not need to be re-rendered. While there are libraries that can handle these kind of things for you, they aren't hard to implement yourself in processing – Timothy Groote Jun 20 '13 at 14:35
  • Ok. I guess I should do the optimization first. Thank you for the helpful comment, Groote. – sehilyi Jun 21 '13 at 01:57

1 Answers1

0

What might boost the performance is drawing your objects to a buffer first and then draw the buffer to the screen – Draw to offscreen buffer

Using OPENGL-mode might improve performance as well: size(400, 400, OPENGL)

Pwdr
  • 3,712
  • 4
  • 28
  • 38