Help with asyncFlattenStrong

I would like to use asyncFlattenStrong to flatten my models in separate thread, but it seems I am not getting exact results I am hoping for.

When I set inPlace=True the models never get returned to the scene graph, they just vanish. When I set inPlace=False and catch the new models in callback function and reparent them to render, it seems to work fine. The question is, why is inPlace=True not working and am I using this correctly at all?
I am using stock Panda 1.7.2.

from direct.showbase.ShowBase import ShowBase
from panda3d.core import *
       
class Application(ShowBase):
    def __init__(self):
        ShowBase.__init__(self) 
        self.root = render.attachNewNode("root")
        a = loader.loadModel('smiley')
        a.setPos(4, 25, 0)
        a.setScale(3,3,3)
        a.reparentTo(self.root)
        b = loader.loadModel('frowney')
        b.setPos(-4,25,0)
        b.reparentTo(self.root)
        b.setScale(3,3,3) 
        self.root.clearModelNodes()
                  
        self.accept("i", render.analyze) 
        self.accept("o", render.ls)
        self.accept("f", self.standardFlatten)
        self.accept("a", self.asyncFlatten)   
        self.accept("s", self.asyncFlattenInPlace)          
    
    def asyncFlatten(self):
        loader.asyncFlattenStrong(model=self.root,inPlace=False,callback=self.callbackFlatten)
    
    def asyncFlattenInPlace(self):
        loader.asyncFlattenStrong(model=self.root,inPlace=True,callback=self.callbackFlattenInPlace)
    
    def standardFlatten(self):
        self.root.flattenStrong()
    
    def callbackFlatten(self, origModelList):
        origModelList.reparentTo(render)
        self.root.removeNode()
        
    def callbackFlattenInPlace(self, origModelList):
        print "callback"
 
            
app = Application()
app.run()

Hm ok, I have resorted to using inPlace = False parameter. I have also downloaded 1.8.0 devel version to try it there. However, I am still getting a visible chug when I call asyncFlattenStrong, not as bad when doing flattenStrong but it is definitely there.

In sample program below flattening of all the nodes lasts approximately 4 seconds. If you press f, program will hang for these 4 secs while it does the flattening. If you press a, program will chug just a little bit in the beginning, after that it will be fine and after 4 secs the flattened structure appears. I would like to know what might be causing the initial chug? Maybe initial copying of the nodes to the new thread?

from direct.showbase.ShowBase import ShowBase
from panda3d.core import *
import time
       
class Application(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)
        self.root = render.attachNewNode("root")
        for i in xrange(1,100):
            for j in xrange(1,20):
                a = loader.loadModel('misc/sphere')
                a.setPos(i, j, 0)
                a.reparentTo(self.root)
        self.root.clearModelNodes()
                 
        self.accept("i", render.analyze)
        self.accept("o", render.ls)
        self.accept("f", self.standardFlatten)
        self.accept("a", self.asyncFlatten)   
        self.accept("s", self.asyncFlattenInPlace)         
   
    def asyncFlatten(self):
        print time.time(), 'BEGIN'
        loader.asyncFlattenStrong(model=self.root,inPlace=False,callback=self.callbackFlatten)
        print time.time(), 'END'
   
    def asyncFlattenInPlace(self):
        loader.asyncFlattenStrong(model=self.root,inPlace=True,callback=self.callbackFlattenInPlace)
   
    def standardFlatten(self):
        print time.time()
        self.root.flattenStrong()
        print time.time()
   
    def callbackFlatten(self, origModelList):
        print time.time()
        self.root.removeNode()
        print time.time()
        origModelList.reparentTo(render)
        print time.time()
        
       
    def callbackFlattenInPlace(self, origModelList):
        print "callback"
 
           
app = Application()
app.run()