From: <enl...@li...> - 2005-10-27 12:13:17
|
Enlightenment CVS committal Author : lordchaos Project : e17 Module : proto Dir : e17/proto/entropy/src Modified Files: entropy_core.c notification_engine.c Log Message: * Create the concept of 'bulk event commit'. Should make directory changes faster =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- entropy_core.c 27 Oct 2005 10:23:59 -0000 1.8 +++ entropy_core.c 27 Oct 2005 12:12:22 -0000 1.9 @@ -558,6 +558,10 @@ void entropy_core_layout_notify_event(entropy_gui_component_instance* instance, entropy_gui_event* event, int event_type) { /*First get the layout hash*/ + entropy_gui_component_instance* iter; + Ecore_List* el; + Ecore_Hash* lay_hash; + entropy_gui_component_instance* layout = NULL; if (event_type == ENTROPY_EVENT_LOCAL) { @@ -574,9 +578,8 @@ //printf("Instance's core reference: instance: %p, %p\n", instance, instance->core); - Ecore_Hash* lay_hash = ecore_hash_get(instance->core->layout_gui_events, layout); - entropy_gui_component_instance* iter; - Ecore_List* el; + lay_hash = ecore_hash_get(instance->core->layout_gui_events, layout); + if (!lay_hash) { @@ -895,7 +898,7 @@ if (listener) { listener->count--; - if (listener->count == 0) { + if (listener->count == 0 && 0) { /*This should be a seperate function*/ entropy_generic_file_destroy(listener->file); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/notification_engine.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- notification_engine.c 27 Oct 2005 07:16:35 -0000 1.2 +++ notification_engine.c 27 Oct 2005 12:12:22 -0000 1.3 @@ -153,7 +153,7 @@ } - usleep(1000); + usleep(50); /*Allow the CPU to have a rest*/ } pthread_mutex_unlock(¬ify->loop_mutex); @@ -248,6 +248,22 @@ } +void entropy_notify_event_bulk_commit(entropy_notification_engine* engine, Ecore_List* list) { + entropy_notify_event* ev; + + pthread_mutex_lock(&engine->op_queue_mutex); + while ( (ev = ecore_list_remove_first(list))) { + ecore_list_append(engine->op_queue, ev); + } + pthread_mutex_unlock(&engine->op_queue_mutex); + + ecore_list_destroy(list); + +} + + + + void entropy_notify_lock_loop(entropy_notification_engine* notify) { pthread_mutex_lock(¬ify->op_queue_mutex); |