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 610246 - [optimization] Speed up _get_range()
[optimization] Speed up _get_range()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.27
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-17 11:32 UTC by Edward Hervey
Modified: 2010-02-17 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
basesrc: Don't use expensive cast checks in get_range. (1.05 KB, patch)
2010-02-17 11:33 UTC, Edward Hervey
none Details | Review
filesrc: Don't use expensive cast checks in _create (1.52 KB, patch)
2010-02-17 11:33 UTC, Edward Hervey
none Details | Review

Description Edward Hervey 2010-02-17 11:32:13 UTC
The following two patches speed up by 38% the usage of _get_range()
Comment 1 Edward Hervey 2010-02-17 11:33:41 UTC
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).
Comment 2 Edward Hervey 2010-02-17 11:33:45 UTC
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).
Comment 3 Edward Hervey 2010-02-17 11:37:59 UTC
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