On Sat, 2004-06-05 at 06:18, Petr KrajÄa wrote: > hello, > > i have small performance problem. if i remove multiple objects from document (about > 300), it takes about half a minute. it seems to be a long time, because adding these > objects takes just 4 seconds. > the code is something like this: > > int cnt = list.size(); > for (int i = 0; i < cnt; i++) > { > Node e = (Node)list.get(i); > if (e != null) e.getParentNode().removeChild(e); > } > > list.clear();
Are you running this code inside the update thread? canvas.getUpdateManager().getUpdateRunnableQueue(). invokeAndWait(new Runnable() { public void run() { // Insert some actions on the DOM here } }); > > i think this is caused by some rerendring or something like that. is there anyway > howto make this code faster? > > thanks for anything > > petr krajca -- Robert Marcano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]