Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-04 Thread Dave Cowden
Hehe grin. obviously by "hot code" i was definitely not a measure of the importance of my project, I just meant the frequency this code is running ;) funny though. Basically the problem im solving is the same as i've been working on a long time: i am filling slices of solid objects with toolpaths

Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-03 Thread Jelle Feringa
> I just commented it out, but the 'right' solution might be to use some > other approach to disable it. Normally log.info(...) Has trivial > impact but this code is so hot it matters Well, then I get curious to know what you're up to Dave... ___ Pyth

Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-03 Thread Dave Cowden
Hi, Thomas: Thanks for the help. I changed TopoDS_Shape method to this: def __del__(self): self.thisown=False; self._kill_pointed(); self.thisown=False was required to suppress swig warnings of memory leak, cannot find destructor This helped performance a lot. Profiled execution tim

Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-03 Thread Dave Cowden
Oh, one other thing I forgot to mention. I was reminded just now that, as a port of performance tuning, I saw substantial overhead due to the use of the logging framework in the garbage collector. That code is hot enough that removing the logging and initialization of logging was significant. I j

Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-03 Thread Dave Cowden
As always Thomas thanks for the quick and complete help! The code below was an attempt to be very fast-- my earlier code was creating a TopoDS_Edge object as well. I will implement your recommendation tonight and I expect it will work wonders. One interesting question regarding this problem: Ar

Re: [Pythonocc-users] Need help with Garbage collector...

2011-03-03 Thread Thomas Paviot
2011/3/3 Dave Cowden > Hi, everyone: > > I'm performance tuning some code, and running into an issue that I could > use some help with. When I run this code: > > def loopWire2(w): > edges = TopTools.TopTools_HSequenceOfShape(); > topexp = TopExp.TopExp_Explorer(); > topexp.Init(w,TopAbs.TopAbs_E