diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-27 12:41:11 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-27 12:41:11 (GMT) |
commit | f21d183b26ea824fadb7c54a3ba9cdf66d99b726 (patch) | |
tree | e3d8d3980f2dc47fae53ec7ba2c8a50654853b91 /doc/src/snippets/code/src_gui_kernel_qlayout.cpp | |
parent | ef17dac74688a8754aa4434a24ddb19d2ab4dcc5 (diff) | |
download | Qt-f21d183b26ea824fadb7c54a3ba9cdf66d99b726.zip Qt-f21d183b26ea824fadb7c54a3ba9cdf66d99b726.tar.gz Qt-f21d183b26ea824fadb7c54a3ba9cdf66d99b726.tar.bz2 |
Fix performance regression of posted events
Commit 31f1ff91028dd7f90925d5b3737e4d88b5fb07aa introduced a performance
regression by using SetTimer() to delay the next call to sendPostedEvents().
SetTimer() has a minimum resolution, around 15-16ms, which is too slow for
most uses. Fast timers and QWidget::update() use posted events to do their
job, and suffered as a result.
This commit goes away from using SetTimer() to using a GetMessage() hook that
examines the input queue as soon as message are pulled from the queue. Now
there is no large delay between calls to sendPostedEvents(), they are sent
as quickly as possible (once all other input and timer messages have been
delivered).
Reviewed-by: Prasanth Ullattil
Task-number: QTBUG-6083
Diffstat (limited to 'doc/src/snippets/code/src_gui_kernel_qlayout.cpp')
0 files changed, 0 insertions, 0 deletions