<HTML>
<HEAD>
<TITLE>Re: [vtk-developers] vtkGarbageCollector performance</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>If you have a section of code that destroys several objects that invoke the garbage collector, then you can temporarily suspend garbage collection until you are finished with the bulk of deletions. Thus, you can replace the many passes of the garbage collector with one single pass. To do that, use the static methods vtkGarbageCollector::DeferredCollectionPush() and vtkGarbageCollector::DeferredCollectionPop().<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 2/1/11 5:14 PM, "Sean McBride" <<a href="sean@rogue-research.com">sean@rogue-research.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi all,<BR>
<BR>
We've been profiling our app and finding that lots of time is spent in<BR>
VTK's garbage collector.<BR>
<BR>
Part of the problem is that we are creating too many temporary objects,<BR>
but I still wanted to investigate a little to see if there are any<BR>
obvious improvements to be had in vtkGarbageCollector itself.<BR>
<BR>
One thing I noticed is that some code is conditionalised with #ifdef<BR>
VTK_LEAN_AND_MEAN. Yet I can't seem to find where VTK_LEAN_AND_MEAN is<BR>
set on or off (except in vtkWinCE.h, which shouldn't apply to me).<BR>
What's it for? Where should I be turning it on?<BR>
<BR>
Cheers,<BR>
<BR>
--<BR>
____________________________________________________________<BR>
Sean McBride, B. Eng <a href="sean@rogue-research.com">sean@rogue-research.com</a><BR>
Rogue Research www.rogue-research.com<BR>
Mac Software Developer Montréal, Québec, Canada<BR>
<BR>
<BR>
_______________________________________________<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</a><BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>