ecore thread - up default 3 of thread workers to 4x cpu cures

this ups it from number of cpu cores to 4 times that (so if threads to
blocking i/o the spare cycles can be used up).
This commit is contained in:
Carsten Haitzler 2017-02-05 13:23:05 +09:00
parent 57c14f1c55
commit 51c7c9bc99
1 changed files with 3 additions and 3 deletions

View File

@ -552,7 +552,7 @@ _ecore_thread_worker_new(void)
void
_ecore_thread_init(void)
{
_ecore_thread_count_max = eina_cpu_count();
_ecore_thread_count_max = eina_cpu_count() * 4;
if (_ecore_thread_count_max <= 0)
_ecore_thread_count_max = 1;
@ -1197,7 +1197,7 @@ ecore_thread_max_set(int num)
EINA_MAIN_LOOP_CHECK_RETURN;
if (num < 1) return;
/* avoid doing something hilarious by blocking dumb users */
if (num > (16 * eina_cpu_count())) num = 16 * eina_cpu_count();
if (num > (32 * eina_cpu_count())) num = 32 * eina_cpu_count();
_ecore_thread_count_max = num;
}
@ -1206,7 +1206,7 @@ EAPI void
ecore_thread_max_reset(void)
{
EINA_MAIN_LOOP_CHECK_RETURN;
_ecore_thread_count_max = eina_cpu_count();
_ecore_thread_count_max = eina_cpu_count() * 4;
}
EAPI int