[vtk-developers] Garbage collection slowness

Berk Geveci berk.geveci at kitware.com
Tue May 13 09:15:40 EDT 2008


Hi Hank,

Where is the big loop over 20000 items happening? Around the Push/Pop
or inside them?

-berk

On Mon, May 12, 2008 at 6:35 PM, Hank Childs <childs3 at llnl.gov> wrote:
>
>  Hello VTK Developers!
>
>  I am running in serial and am setting up about 20000 pipelines on my serial
> process for about 20000 chunks of data.
>
>  The runtime has gotten disproportionately large with the large number of
> chunks and I believe that garbage collection is at least partly to blame.
>
>  For example, if I:
>  1) call vtkGarbageCollector::DeferredCollectionPush()
>  2) execute three filters (filters that find external faces and remove ghost
> data) and,
>  3) call vtkGarbageCollector::DeferredCollectionPop()
>
>  then: the three filters take about 20s total and the DeferredCollectionPop
> takes about 47s.
>
>  One conclusion that I drew from the fast execution of the three filters, is
> that iterating through the data is relatively quickly.  Restated, I ruled
> out thrashing through memory as the reason the garbage collector is taking
> 47s.
>
>  Also, I should disclose that I am managing the execution manually.  The
> best way to describe it would be that I have one instance of filter A, one
> instance of filter B, and one instance of filter C and that I route all 20K
> data sets through filter A, to make 20K new data sets, then route those 20K
> new data sets through B, and so on.  Also, I know that the alternative is to
> call "Update()" 20K times, one for each chunk, but I'd prefer not to go down
> that route, for reasons I can explain if necessary.
>
>  So: can anyone point me to some words of wisdom about a way to manage my
> data objects so that garbage collection is faster?
>
>  Best regards,
>  Hank_______________________________________________
>  vtk-developers mailing list
>  vtk-developers at vtk.org
>  http://www.vtk.org/mailman/listinfo/vtk-developers
>



More information about the vtk-developers mailing list