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 627780 - GstClockOverlay re-renders string even if it hasn't changed, resulting in very high CPU usage.
GstClockOverlay re-renders string even if it hasn't changed, resulting in ver...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-23 22:55 UTC by Chris Shoemaker
Modified: 2010-08-24 07:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clockoverlay: only rerender text if time string has changed (2.58 KB, patch)
2010-08-23 22:55 UTC, Chris Shoemaker
committed Details | Review

Description Chris Shoemaker 2010-08-23 22:55:17 UTC
Created attachment 168597 [details] [review]
clockoverlay: only rerender text if time string has changed

[PATCH] clockoverlay: only rerender text if time string has changed

The textoverlay element will rerender the text string whenever
overlay sets the 'need_render' flag to TRUE.  Previously, we
lazily set the flag to TRUE every time the time string was requested.
Now, we save a copy of the previously given string, and only set
'need_render' to TRUE if the string has changed.

In my tests with a 30fps video stream, and a time string including
a seconds field, this change reduced the CPU usage of the clockoverlay
element from 60% to 5%.
Comment 1 Sebastian Dröge (slomo) 2010-08-24 07:30:26 UTC
commit 6bd90dc0cc742390c2f1e842e1f026a3503ded63
Author: Chris Shoemaker <chris.shoemaker@cox.net>
Date:   Mon Aug 23 18:51:18 2010 -0400

    clockoverlay: only rerender text if time string has changed
    
    The textoverlay element will rerender the text string whenever
    overlay sets the 'need_render' flag to TRUE.  Previously, we
    lazily set the flag to TRUE every time the time string was requested.
    Now, we save a copy of the previously given string, and only set
    'need_render' to TRUE if the string has changed.
    
    In my tests with a 30fps video stream, and a time string including
    a seconds field, this change reduced the CPU usage of the clockoverlay
    element from 60% to 5%.
    
    Fixes bug #627780.