forked from enlightenment/efl
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:
parent
57c14f1c55
commit
51c7c9bc99
|
@ -552,7 +552,7 @@ _ecore_thread_worker_new(void)
|
||||||
void
|
void
|
||||||
_ecore_thread_init(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)
|
if (_ecore_thread_count_max <= 0)
|
||||||
_ecore_thread_count_max = 1;
|
_ecore_thread_count_max = 1;
|
||||||
|
|
||||||
|
@ -1197,7 +1197,7 @@ ecore_thread_max_set(int num)
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||||
if (num < 1) return;
|
if (num < 1) return;
|
||||||
/* avoid doing something hilarious by blocking dumb users */
|
/* 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;
|
_ecore_thread_count_max = num;
|
||||||
}
|
}
|
||||||
|
@ -1206,7 +1206,7 @@ EAPI void
|
||||||
ecore_thread_max_reset(void)
|
ecore_thread_max_reset(void)
|
||||||
{
|
{
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||||
_ecore_thread_count_max = eina_cpu_count();
|
_ecore_thread_count_max = eina_cpu_count() * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
|
|
Loading…
Reference in New Issue