MPI-IS / mesh

MPI-IS Mesh Processing Library
Other
643 stars 147 forks source link

meshviewer.save_snapshot() becomes super slow in version 0.4. #42

Closed qianlim closed 4 years ago

qianlim commented 4 years ago

Hello, I've been using the meshviewer.set_dynamic_meshes() followed by save_snapshot() to quickly render a sequence of images out of a sequence of meshes. It works well in all previous versions, but in the latest 0.4 release, it becomes super slow to save snapshots. Could you help me on that? Thanks.

ioreshnikov commented 4 years ago

Hey!

Sorry for the long reply. Yes, the default behaviour for save_snapshot() is to wait for a certain timeout after displaying an image to ensure that the image has been updated (see #25 if you're curious why). By default this timeout is set to 1 second. You can adjust it by passing wait_time=0.1 if you want to have it shorter or even wait_time=0.0 if you don't want it at all.

qianlim commented 4 years ago

Thanks for clarifying!