[vlc-devel] [PATCH] Added a performance check to marquee filter

basos g noxelia at gmail.com
Fri Jan 9 14:42:33 CET 2009

2009/1/9 Antoine Cellerier <dionoea at videolan.org>:
> On Fri, Jan 09, 2009, Antoine Cellerier wrote:
>> if no valid format was detected
> Well ... not no valid format but no format with a dynamic result (or
> whatever the correct term is)
What is the gain of this ? You would still have to preparse the string
from the strfmt use.
This mod is for this marquee use case

marq_refresh=35 /*msecs e.g. ~25 fps */

and a marq user updating the marq_marquee at regular intervals with a
string like
"value: 67%%" that would be str_format(ed) as "value: 67%".
But we don't want marq to call str_format 25 times per second just to
update a %% sign (but with the overhead of calling strftime and mostly

If you prefer a more general optimization ( because this string might
be found on other str_format calls) then i would suggest to embed the
preparsing code inside strfmt and only call localtime() when a %x is
found, with x!=%.

More information about the vlc-devel mailing list