From 1ae3c61f78a8c62c947e94c7da8656d6849e3a24 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Sun, 3 Feb 2008 11:44:56 +0000 Subject: bump the ensureBuffers multiple, makes a _huge_ difference --- org/freedesktop/dbus/Message.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'org') diff --git a/org/freedesktop/dbus/Message.java b/org/freedesktop/dbus/Message.java index 81164cb..1e3699e 100644 --- a/org/freedesktop/dbus/Message.java +++ b/org/freedesktop/dbus/Message.java @@ -623,13 +623,13 @@ public class Message } else if (data instanceof List) { Object[] contents = ((List) data).toArray(); int diff = i; - ensureBuffers(contents.length*2); + ensureBuffers(contents.length*4); for (Object o: contents) diff = appendone(sigb, i, o); i = diff; } else if (data instanceof Map) { int diff = i; - ensureBuffers(((Map) data).size()*3); + ensureBuffers(((Map) data).size()*6); for (Map.Entry o: ((Map) data).entrySet()) diff = appendone(sigb, i, o); if (i == diff) { @@ -644,7 +644,7 @@ public class Message i = diff; } else { Object[] contents = (Object[]) data; - ensureBuffers(contents.length*2); + ensureBuffers(contents.length*4); int diff = i; for (Object o: contents) diff = appendone(sigb, i, o); @@ -661,7 +661,7 @@ public class Message contents = ((Container) data).getParameters(); else contents = (Object[]) data; - ensureBuffers(contents.length*2); + ensureBuffers(contents.length*4); int j = 0; for (i++; sigb[i] != ArgumentType.STRUCT2; i++) i = appendone(sigb, i, contents[j++]); -- cgit v1.2.3