GNOME Bugzilla – Bug 610246
[optimization] Speed up _get_range()
Last modified: 2010-02-17 11:37:59 UTC
The following two patches speed up by 38% the usage of _get_range()
Created attachment 154017 [details] [review] basesrc: Don't use expensive cast checks in get_range. _get_range() is a pad function set by ourselves, therefore we're certain that the parent is a GstBaseSrc. Speeds up _get_range by 38%, and the total call by 30%. (valgrind instruction calls measurements).
Created attachment 154018 [details] [review] filesrc: Don't use expensive cast checks in _create _create() is a pad function set by ourselves, therefore we're sure basesrc is a GstFileSrc. Speeds up _create() by 17% and the total call by 8% (instruction calls measurements done with valgrind).
commit 1f0b6f35d5cd5a9fe7272c82e680eb2b84655015 Author: Edward Hervey <bilboed@bilboed.com> Date: Wed Feb 17 12:16:37 2010 +0100 filesrc: Don't use expensive cast checks in _create _create() is a pad function set by ourselves, therefore we're sure basesrc is a GstFileSrc. Speeds up _create() by 17% and the total call by 8% (instruction calls measurements done with valgrind). Fixes #610246 commit bc9e129990805b065e7a0357590cf1e580d9ffad Author: Edward Hervey <bilboed@bilboed.com> Date: Wed Feb 17 12:14:09 2010 +0100 basesrc: Don't use expensive cast checks in get_range. _get_range() is a pad function set by ourselves, therefore we're certain that the parent is a GstBaseSrc. Speeds up _get_range by 38%, and the total call by 30%. (valgrind instruction calls measurements). Fixes #610246