Forum

Author Topic: Python Workflow is getting slower after a series looping runs  (Read 5020 times)

an198317

  • Newbie
  • *
  • Posts: 42
    • View Profile
Hi,

I created a Python workflow to loop through the different folders for making a series models.

As I can see the first one or two Photoscan run is fairly fast, but PhotoScan get slower and slower. And I can tell the mesh creating step is really taking a long time not processing but "waiting" when it's already showing mesh creating is 100% finished.

In my python workflow, I did remove chunks after each model made, and also did garbage collector run. But it seems not work. The only way can speed PhotoScan is closing it and reopen PhotoScan, then the process will be back to fast again.

Any thoughts or inputs are really appreciated.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Python Workflow is getting slower after a series looping runs
« Reply #1 on: June 25, 2014, 09:00:20 PM »
Hello an198317,

Is it possible that delay on 100% mesh generation is caused by huge number of polygons and solid/shaded mode turned on? You can try to disable automatic switch to model view in Preferences and see if it works faster.

Please also specify if you are removing chunks by .remove() method or by assigning None to chunk variable?
Best regards,
Alexey Pasumansky,
Agisoft LLC

an198317

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Python Workflow is getting slower after a series looping runs
« Reply #2 on: June 25, 2014, 10:34:11 PM »
Hi Alexey,

Thanks for your response. As I talked to you before, I have already turned off the "switch to the model view by default". So the PhotoScan is actually showing nothing but running my python code to process the model.

And I used .remove() method to remove the current chunk. And after this step, I used gc.collect() to collect the garbage.

Thanks again!
Nan

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Python Workflow is getting slower after a series looping runs
« Reply #3 on: July 12, 2014, 06:30:42 PM »
Hello Nan,

Could you please send your code to my e-mail?
Best regards,
Alexey Pasumansky,
Agisoft LLC