[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 4/6] ui/vnc: optimize clearing in find_and_clear_d
From: |
Peter Lieven |
Subject: |
[Qemu-devel] [PATCHv2 4/6] ui/vnc: optimize clearing in find_and_clear_dirty_height() |
Date: |
Thu, 21 Nov 2013 09:51:15 +0100 |
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 <address@hidden>
---
ui/vnc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 5dd1efe..3bbf2af 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -875,13 +875,10 @@ static int find_and_clear_dirty_height(struct VncState
*vs,
int h;
for (h = 1; h < (height - y); h++) {
- int tmp_x;
if (!test_bit(last_x, vs->dirty[y + h])) {
break;
}
- for (tmp_x = last_x; tmp_x < x; tmp_x++) {
- clear_bit(tmp_x, vs->dirty[y + h]);
- }
+ bitmap_clear(vs->dirty[y + h], last_x, x - last_x);
}
return h;
--
1.7.9.5
- [Qemu-devel] [PATCHv2 0/6] ui/vnc: update optimizations, Peter Lieven, 2013/11/21
- [Qemu-devel] [PATCHv2 2/6] ui/vnc: derive cmp_bytes from VNC_DIRTY_PIXELS_PER_BIT, Peter Lieven, 2013/11/21
- [Qemu-devel] [PATCHv2 4/6] ui/vnc: optimize clearing in find_and_clear_dirty_height(),
Peter Lieven <=
- [Qemu-devel] [PATCHv2 1/6] ui/vnc: introduce VNC_DIRTY_PIXELS_PER_BIT macro, Peter Lieven, 2013/11/21
- [Qemu-devel] [PATCHv2 3/6] ui/vnc: optimize dirty bitmap tracking, Peter Lieven, 2013/11/21
- [Qemu-devel] [PATCHv2 6/6] ui/vnc: disable adaptive update calculations if not needed, Peter Lieven, 2013/11/21
- [Qemu-devel] [PATCHv2 5/6] ui/vnc: optimize setting in vnc_dpy_update(), Peter Lieven, 2013/11/21