summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@src.gnome.org>2002-10-06 19:50:31 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-10-06 19:50:31 +0000
commit81b63160819dedd7ed9aabd49d6fa76ff372de73 (patch)
tree4e1f3c2684a33ea964740d01abcb92876805370f
parentfc4a0aef0d053f264f2d00d76035d9bef61efe8b (diff)
downloadmetacity-81b63160819dedd7ed9aabd49d6fa76ff372de73.tar.gz
metacity-81b63160819dedd7ed9aabd49d6fa76ff372de73.tar.bz2
rig the benchmark a bit ;-)
-rw-r--r--src/testasyncgetprop.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/testasyncgetprop.c b/src/testasyncgetprop.c
index 01ad0c3..895cd0a 100644
--- a/src/testasyncgetprop.c
+++ b/src/testasyncgetprop.c
@@ -373,8 +373,11 @@ run_speed_comparison (Display *xdisplay,
struct timeval start, end;
int n_left;
- /* We just use atom values 0 to n_props, many are probably BadAtom,
- * that's fine.
+ /* We just use atom values (0 to n_props) % 200, many are probably
+ * BadAtom, that's fine, but the %200 keeps most of them valid. The
+ * async case is about twice as advantageous when using valid atoms
+ * (or the issue may be that it's more advantageous when the
+ * properties are present and data is transmitted).
*/
n_props = 4000;
printf ("Timing with %d property requests\n", n_props);
@@ -385,7 +388,7 @@ run_speed_comparison (Display *xdisplay,
while (i < n_props)
{
if (ag_task_create (xdisplay,
- window, (Atom) i,
+ window, (Atom) i % 200,
0, 0xffffffff,
False,
AnyPropertyType) == NULL)
@@ -467,7 +470,7 @@ run_speed_comparison (Display *xdisplay,
data = NULL;
if (XGetWindowProperty (xdisplay, window,
- (Atom) i,
+ (Atom) i % 200,
0, 0xffffffff,
False,
AnyPropertyType,