After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709113 - [PATCH] Main loop dispatch path has needless linked list
[PATCH] Main loop dispatch path has needless linked list
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: mainloop
2.37.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-09-30 16:02 UTC by Phillip Susi
Modified: 2013-09-30 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
08_drop_useless_list.patch (2.40 KB, patch)
2013-09-30 16:02 UTC, Phillip Susi
none Details | Review

Description Phillip Susi 2013-09-30 16:02:58 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.
Comment 2 Allison Karlitskaya (desrt) 2013-09-30 16:40:34 UTC
Since we both wrote pretty much exactly the same patch independently, I'm going to merge this.
Comment 3 Allison Karlitskaya (desrt) 2013-09-30 16:42:29 UTC
Thanks for the report.  Merged.