]> git.proxmox.com Git - mirror_qemu.git/commit - ui/vnc.c
ui/vnc: optimize clearing in find_and_clear_dirty_height()
authorPeter Lieven <pl@kamp.de>
Wed, 8 Jan 2014 09:08:36 +0000 (10:08 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 Mar 2014 11:35:04 +0000 (12:35 +0100)
commit863d7c91050551def59116f4f3b39fab7f1568f7
tree201fa34400a616a8cf3f942fc58b92d3c5bf5dcf
parent12b316d4c173bf07f421ef9dc98ba4b53916066e
ui/vnc: optimize clearing in find_and_clear_dirty_height()

The following artifical test (just the bitmap operation part) running
vnc_update_client 65536 times on a 2560x2048 surface illustrates the
performance difference:

All bits clean - vnc_update_client_new: 0.07 secs
                 vnc_update_client_new2: 0.07 secs
                 vnc_update_client_old: 10.98 secs

All bits dirty - vnc_update_client_new: 11.26 secs
               - vnc_update_client_new2: 0.29 secs
                 vnc_update_client_old: 20.19 secs

Few bits dirty - vnc_update_client_new: 0.07 secs
               - vnc_update_client_new2: 0.07 secs
                 vnc_update_client_old: 10.98 secs

vnc_update_client_new2 shows the performance of vnc_update_client
with this patch added.

Comparing with the test run of the last patch the performance
is at least unchanged while it is significantly improved
for the all bits dirty case.

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c