From: subhransu mohanty Date: Wed, 30 Oct 2019 09:47:00 +0000 (+0900) Subject: rlottie: reduce polling count for task scheduler to 2. X-Git-Tag: accepted/tizen/unified/20191114.123438~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb0505b21955d625d9d5bbf98655e715e9734293;p=platform%2Fcore%2Fuifw%2Flottie-player.git rlottie: reduce polling count for task scheduler to 2. when the queue is empty the thread tries to steal from other queue and it was doing it 32 times .. changed it to 2 as it was spinning for long time before going to sleep. As we always give the tasks in batches we can reduce the spin time. --- diff --git a/src/lottie/lottieanimation.cpp b/src/lottie/lottieanimation.cpp index ce40d4a..2b1938c 100644 --- a/src/lottie/lottieanimation.cpp +++ b/src/lottie/lottieanimation.cpp @@ -149,7 +149,7 @@ class RenderTaskScheduler { while (true) { bool success = false; SharedRenderTask task; - for (unsigned n = 0; n != _count * 32; ++n) { + for (unsigned n = 0; n != _count * 2; ++n) { if (_q[(i + n) % _count].try_pop(task)) { success = true; break; diff --git a/src/vector/vraster.cpp b/src/vector/vraster.cpp index fb340db..22fc331 100644 --- a/src/vector/vraster.cpp +++ b/src/vector/vraster.cpp @@ -437,7 +437,7 @@ class RleTaskScheduler { while (true) { bool success = false; - for (unsigned n = 0; n != _count * 32; ++n) { + for (unsigned n = 0; n != _count * 2; ++n) { if (_q[(i + n) % _count].try_pop(task)) { success = true; break;