efreet: Low priority for cache rebuild

This commit is contained in:
Sebastian Dransfeld 2013-06-20 13:53:54 +02:00
parent 336f6ec328
commit 58fc3a8f32
4 changed files with 10 additions and 9 deletions

View File

@ -5,6 +5,8 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <Eina.h>
#include <Eet.h>
@ -250,6 +252,7 @@ main(int argc, char **argv)
}
extra_dirs = eina_list_sort(extra_dirs, -1, EINA_COMPARE_CB(strcmp));
setpriority(PRIO_PROCESS, 0, 19);
/* init external subsystems */
if (!eet_init()) goto eet_error;
if (!ecore_init()) goto ecore_error;

View File

@ -6,6 +6,8 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <Eina.h>
#include <Eet.h>
@ -768,6 +770,7 @@ main(int argc, char **argv)
flush = EINA_TRUE;
}
setpriority(PRIO_PROCESS, 0, 19);
if (!eet_init()) return -1;
if (!ecore_init()) return -1;

View File

@ -2,6 +2,9 @@
# include <config.h>
#endif
#include <sys/time.h>
#include <sys/resource.h>
#include <Ecore.h>
#include <Ecore_File.h>
@ -34,6 +37,7 @@ main(int argc, char *argv[])
if (!dbus_init()) goto dbus_error;
if (!cache_init()) goto cache_error;
setpriority(PRIO_PROCESS, 0, 19);
ecore_main_loop_begin();
cache_shutdown();

View File

@ -42,7 +42,6 @@ static Eina_Bool
icon_cache_update_cache_cb(void *data EINA_UNUSED)
{
char file[PATH_MAX];
int prio;
icon_cache_timer = NULL;
@ -55,9 +54,6 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
if ((!icon_flush) && (!icon_exts)) return ECORE_CALLBACK_CANCEL;
/* TODO: Queue if already running */
prio = ecore_exe_run_priority_get();
ecore_exe_run_priority_set(19);
snprintf(file, sizeof(file),
"%s/efreet/" MODULE_ARCH "/efreet_icon_cache_create",
eina_prefix_lib_get(pfx));
@ -90,7 +86,6 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
icon_flush = EINA_FALSE;
icon_cache_exe =
ecore_exe_pipe_run(file, ECORE_EXE_PIPE_READ|ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
ecore_exe_run_priority_set(prio);
return ECORE_CALLBACK_CANCEL;
}
@ -109,7 +104,6 @@ static Eina_Bool
desktop_cache_update_cache_cb(void *data EINA_UNUSED)
{
char file[PATH_MAX];
int prio;
desktop_cache_timer = NULL;
@ -119,8 +113,6 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
return ECORE_CALLBACK_CANCEL;
}
desktop_queue = EINA_FALSE;
prio = ecore_exe_run_priority_get();
ecore_exe_run_priority_set(19);
snprintf(file, sizeof(file),
"%s/efreet/" MODULE_ARCH "/efreet_desktop_cache_create",
@ -140,7 +132,6 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
INF("Run desktop cache creation: %s", file);
desktop_cache_exe =
ecore_exe_pipe_run(file, ECORE_EXE_PIPE_READ|ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
ecore_exe_run_priority_set(prio);
return ECORE_CALLBACK_CANCEL;
}