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 118582 - Do not use mmap for filesrc plugin.
Do not use mmap for filesrc plugin.
Status: RESOLVED DUPLICATE of bug 117786
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-29 15:35 UTC by Ramon Garcia Fernandez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ramon Garcia Fernandez 2003-07-29 15:35:49 UTC
Please do not use mmap() for reading a file.

According to Linus, with mmap() the actual reading is fast, but settting up
the mmap() is slow, because it invalidates the cache used by the processor
for the translation of virtual addresses to physical ones. So mmap is a
good thing if you call it once in the program, and the read many, many
times. It is also good for sharing the memory overhead of reading a file
between several processes. However, if one is creating and destroying mmaps
all over the time, that is quite slow.
Comment 1 Ronald Bultje 2003-07-29 16:00:49 UTC
Linus is talking about multiple opens per second, whereas your average
media file takes quite a bit longer than a second, I hope. ;).

However, for media tag parsing, this makes sense, yes.
Comment 2 Ronald Bultje 2003-07-29 17:47:18 UTC
Anyway, for now, close... It's a good idea to add read() support on
the long term, but just not now... there's another bug for this
already anyway. :).

*** This bug has been marked as a duplicate of 117786 ***