GNOME Bugzilla – Bug 709113
[PATCH] Main loop dispatch path has needless linked list
Last modified: 2013-09-30 16:42:29 UTC
Created attachment 256109 [details] [review] 08_drop_useless_list.patch The dispatch path was using a linked list to maintain a stack of the current source being dispatched. The purpose of this was to be able to report the current source, which only cares about the top of the stack. Therefore, there is no point to keeping the full stack in a linked list when only the current head is needed, so do away with the list and simply stuff the previous source in a local on the stack, to be restored post dispatch. This saves some needless pointer manipulation.
See also https://git.gnome.org/browse/glib/commit/?h=dispatch-data&id=183e7c605e96acfef9c7999d207df4cc86bb6672
Since we both wrote pretty much exactly the same patch independently, I'm going to merge this.
Thanks for the report. Merged.