We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Speed Question (Read 358 times)
Speed Question
May 27th, 2009, 9:54am
 
I am writing a program that is going to display static data.  It will display a different image depending on where the user moves the mouse on a map.  I would assume that I need to do some sort of buffering to make this work smoothly as the user moves the mouse but first I need to decide on the basic design.

I currently have a program that makes the images from the static data (that I am trying to extend to be interactive).  The images are 365x365 but I would like to display at 730x730.

Is it going to be faster to pregenerate all of my images (about 18,000) and load them as the mouse goes over the specified region or would it make more sense to generate them on the fly (involves reading a text file with ~8000 lines and drawing out the points).

I am assuming that pregenerating and loading (maybe with a buffer?) is going to be a better option.  If so, would it be better to generate at 730x730 (creating 4x the file overhead) or stick to 365x365 images and resize them in processing at display time?

Thanks
Re: Speed Question
Reply #1 - May 27th, 2009, 11:39am
 
Also, if the images are in tiff format they end up being about 300k or so.  With 18000 images, would it make more sense to load everything into ram?

It should come out under a gig and I plan to display it on a machine with 4gb DDR2 and dual 3Ghz quad core xeons.

I just want to be able to get smooth animation between frames.
Page Index Toggle Pages: 1