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.
IndexProgramming Questions & HelpSyntax Questions › Reducing Memory Requirement
Page Index Toggle Pages: 1
Reducing Memory Requirement (Read 522 times)
Reducing Memory Requirement
Nov 15th, 2006, 10:14am
 
I need to reduce the memory requirements of an existing charting application. Presently 90% memory of the application is being used by Processing classes.
we are using core-110.jar. PGraphics2, PGraphics3 and PFont are consuming sizeable amount of memory.

I want to know if there are 'memory optimum' methods that can substitute for 'memory hungary' methods.
Some methods that we are using frequently are 'drawLabels, drawGrids, drawSubGrids, drawAxis,line, rect.

Is drawing some shapes(ellipse,polygon,circle) more optimal than others?

Have memory requirements been reduced in subsequent version of core.jar. I went through the release notes. But that does not seem to suggest that.
Re: Reducing Memory Requirement
Reply #1 - Nov 18th, 2006, 3:16pm
 
Without knowing anything too specific about your code, I can't say too much about where you could optimize your code. If you posted some examples, I could try to figure out how to help you with that.

One thing that comes to mind is to check for any memory leaks that may come from loading resources in the draw() function. Other than that, I'd try to figure out the methods that are hogging the memory, and see if any of your algorithms could be optimized.
Page Index Toggle Pages: 1