[vtkusers] Deleting vtkActor takes long

Clinton Stimpson clinton at elemtech.com
Wed Nov 10 14:05:24 EST 2010


I sprinkle some of these around in my code.

vtkGarbageCollector::DeferredCollectionPush();
... delete code ...
vtkGarbageCollector::DeferredCollectionPop();

It would be nice if this problem were fixed.
I wonder if my problem is related to the cross referencing that happens in 
painter chains.

Clint

On Thursday, November 04, 2010 09:02:51 pm Yang Yang wrote:
> Dear all,
> I have a program to display about 50,000 spheres. It doesn't take too much
> time to display them(about 2 second), however, when I close the program,
> which will first delete all the actors, it takes a very long time(about 30
> seconds). When I debug the code, I found that everytime I pause the debug,
> the program stops somewhere shown in the call stack attached below. It
> seems that the program spends a lot of time in garbage collection, which
> I'm not quite clear how it works. Could anybody tell me how can I speed up
> the deleting actors, or at which direction I should look at. Any suggetion
> will be appreciated.
> 
> Best regards
> Yang
> 
>      std::_Iterator_base::_Orphan_me()    C++
>      std::_Iterator_base::~_Iterator_base()    C++
>      std::_Bidit<vtkGarbageCollectorImpl::Entry
> *,int,vtkGarbageCollectorImpl::Entry * const
> *,vtkGarbageCollectorImpl::Entry * const
> &>::~_Bidit<vtkGarbageCollectorImpl::Entry
> *,int,vtkGarbageCollectorImpl::Entry * const
> *,vtkGarbageCollectorImpl::Entry * const &>()    C++
>      std::_Tree<std::_Tset_traits<vtkGarbageCollectorImpl::Entry
> *,vtkGarbageCollectorImpl::EntryCompare,std::allocator<vtkGarbageCollectorI
> mpl::Entry *>,0> >::const_iterator::~const_iterator()    C++
>      std::_Tree<std::_Tset_traits<vtkGarbageCollectorImpl::Entry
> *,vtkGarbageCollectorImpl::EntryCompare,std::allocator<vtkGarbageCollectorI
> mpl::Entry *>,0> >::iterator::~iterator()    C++
>      std::_Tree<std::_Tset_traits<vtkGarbageCollectorImpl::Entry
> *,vtkGarbageCollectorImpl::EntryCompare,std::allocator<vtkGarbageCollectorI
> mpl::Entry *>,0> >::insert(vtkGarbageCollectorImpl::Entry * const &)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkInformation>(vtkGarbageCollector *,
> vtkInformation * &, const char *)    C++
>      vtkDataObject::ReportReferences(vtkGarbageCollector *)    C++
>      vtkPointSet::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPolyData>(vtkGarbageCollector *,
> vtkPolyData * &, const char *)    C++
>      vtkPrimitivePainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPolyDataPainter>(vtkGarbageCollector *,
> vtkPolyDataPainter * &, const char *)    C++
>      vtkChooserPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
>      vtkCompositePainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
>      vtkScalarsToColorsPainter::ReportReferences(vtkGarbageCollector *)
> C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainter::ReportReferences(vtkGarbageCollector *)    C++
>      vtkDefaultPainter::ReportReferences(vtkGarbageCollector *)    C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *)    C++
>      vtkGarbageCollectorImpl::Report(vtkObjectBase *, void *, const char
> *)    C++
>      vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase
> *, void *, const char *)    C++
>      vtkGarbageCollectorReport<vtkPainter>(vtkGarbageCollector *,
> vtkPainter * &, const char *)    C++
>      vtkPainterPolyDataMapper::ReportReferences(vtkGarbageCollector *)
> C++
> 
> vtkGarbageCollectorToObjectBaseFriendship::ReportReferences(vtkGarbageColle
> ctor *, vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::VisitTarjan(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::MaybeVisit(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::FindComponents(vtkObjectBase *)    C++
>      vtkGarbageCollectorImpl::CollectInternal(vtkObjectBase *)    C++
>      vtkGarbageCollector::Collect(vtkObjectBase *)    C++
>      vtkObjectBase::UnRegisterInternal(vtkObjectBase *, int)    C++
>      vtkObject::UnRegisterInternal(vtkObjectBase *, int)    C++
>      vtkAlgorithm::UnRegister(vtkObjectBase *)    C++
>      vtkActor::~vtkActor()    C++
>      vtkOpenGLActor::~vtkOpenGLActor()    C++
>      vtkOpenGLActor::`vector deleting destructor'()    C++
>      vtkObjectBase::UnRegisterInternal(vtkObjectBase *, int)    C++
>      vtkObject::UnRegisterInternal(vtkObjectBase *, int)    C++
>      vtkObjectBase::UnRegister(vtkObjectBase *)    C++
>      vtkObjectBase::Delete()    C++

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com



More information about the vtkusers mailing list