audio: video: Optimize by using cached quark for meta tag
Avoid taking the global quark lock for every single buffer.
Merge request reports
Activity
- Resolved by Tim-Philipp Müller
added 485 commits
-
88314354...648acbe7 - 484 commits from branch
gstreamer:master
- 08a34fea - audio: video: Optimize by using cached quark for meta tag
-
88314354...648acbe7 - 484 commits from branch
So I was going to add the
g_once_init_{enter,leave}()
bits to the quark getters, then I noticed that the API naming is awkward (gst_meta_tag_audio_quark()
rather thangst_audio_*
), then I noticed that this is mostly for internal use in the libs anyway, apart fromaudioconvert
/audioresample
, and then I couldn't find users for this in good/bad/ugly/elsewhere (other than the rtp plugin that already does some manual caching), so then I started to make it an internal helper function in gstaudio/video, but in the end it seemed easier if every class just does its own private cache for the quark. Better in terms of performance because we can init it in_class_init()
and don't need locking or atomic ops, and probably better in terms of code size + binary size too. So I went for KISS for now. We can always decide to expose API for it later after all if we want.Edited by Tim-Philipp Mülleradded Performance label
added 1 commit
- ccacdc81 - audio: video: Optimize by using cached quark for meta tag
assigned to @gstreamer-merge-bot
mentioned in commit hgr/gst-plugins-base@0826fb95
added 3 commits
-
ccacdc81...5464d420 - 2 commits from branch
gstreamer:master
- 0826fb95 - audio: video: Optimize by using cached quark for meta tag
-
ccacdc81...5464d420 - 2 commits from branch
changed milestone to %1.17.2