[vlc-devel] commit: Workaround braindead QT implementation of ResizeToContents ( Marian Ďurkovič )
remi at remlab.net
Tue Sep 22 09:03:14 CEST 2009
On Tue, 22 Sep 2009 08:02:07 +0200, "Marian Ďurkovič" <md at bts.sk> wrote:
> Just to give an idea how "efficient" is the QT4's ResizeToContents, here
> are test results on the same EPG data with different QT4 methods:
> 1) default (text cut at right window edge) 7 msec
> 2) the "right" thing (ResizeToContents) 76 msec
> 3) my latest workaroud (columnwidth=20000) 7 msec
> Results were obtained by putting
> msg_Err (p_intf, "update %lld", mdate());
Don't do that!
First, msg_Generic() is not very fast, so you don't want to include it. You
should fetch the two timestamps and print them outside of the measurement.
Second, mdate() uses the monotonic clock. You want to use the thread CPU
time clock instead here. With a typical desktop OS scheduler at 100 Hz
frequency, any duration over a few milliseconds is likely to be totally off
due to preemption.
More information about the vlc-devel