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 332151 - xml registry loader should use mmap() where possible
xml registry loader should use mmap() where possible
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-22 10:03 UTC by Tim-Philipp Müller
Modified: 2006-03-23 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tentative patch (2.44 KB, patch)
2006-02-22 10:06 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2006-02-22 10:03:29 UTC
There's a simple mmap() wrapper in GLib since GLib-2.8, the XML registry reader should try to use that when reading registry files and we're compiling against GLib-2.8 or newer.

Tentative patch coming up.
Comment 1 Tim-Philipp Müller 2006-02-22 10:06:31 UTC
Created attachment 59921 [details] [review]
tentative patch
Comment 2 Wim Taymans 2006-03-23 10:19:15 UTC
patch looks simple and good. Is this any faster or just more fancy?
Comment 3 Tim-Philipp Müller 2006-03-23 11:33:45 UTC
On my systems here it's reproducibly faster (hot cache). Only a tad though, nothing spectacular. But then, every little bit helps, no?
Comment 4 Tim-Philipp Müller 2006-03-23 11:57:18 UTC
2006-03-23  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/gstregistryxml.c: (gst_registry_xml_read_cache):
          If compiling against GLib-2.8 or newer, try to read the
          registry file using GMappedFile first before falling back
          to fopen() + fread() (#332151).