vnc: tight: stop using qdict for palette stuff
commit5136a0526989fdfd8799ae4e29ff43d5b80ee37e
authorCorentin Chary <corentincj@iksaif.net>
Wed, 7 Jul 2010 18:57:58 +0000 (7 20:57 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 26 Jul 2010 22:36:14 +0000 (26 17:36 -0500)
treedb123aaff5757a8155c4a1808c0558c8eb7fc9c1
parent3941bf6fb1c98a39bf8a0cfb4feacaef2a23d0db
vnc: tight: stop using qdict for palette stuff

Profiling with callgrind seems to show that a lot of time is spent
in the palette code (mostly due to memory allocation and qdict to int
conversion).

This patch adds a VncPalette implementation. The palette is stored
in a hash table, like qdict, but which does way less memory allocations,
and doesn't suffer from the QObject overhead.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile.objs
ui/vnc-enc-tight.c
ui/vnc-palette.c [new file with mode: 0644]
ui/vnc-palette.h [new file with mode: 0644]