Fix T47351: slow rigid body sim bake after recent changes to use jobs system.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 7 Feb 2016 13:25:38 +0000 (14:25 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 7 Feb 2016 13:35:21 +0000 (14:35 +0100)
The bake system had a 200ms sleep for each frame substep, to give the UI time
to redraw. I don't think there is a good reason to have this, with fair thread
scheduling this will give UI thread 2x more time at best, and the UI doesn't
need to be that responsive during bake.

source/blender/blenkernel/intern/pointcache.c

index 71b68cefde210da8e21380f5c84043ae93a2e1b6..4de924e954f05a8848f2772ce1b64a8d28eba0d0 100644 (file)
@@ -3681,9 +3681,6 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
                        ptime = ctime;
                }
 
-               /* Delay to lessen CPU load from UI thread */
-               PIL_sleep_ms(200);
-
                /* NOTE: breaking baking should leave calculated frames in cache, not clear it */
                if ((cancel || G.is_break)) {
                        break;