- From: Philippe Le Hegaret <plh@w3.org>
- Date: 29 Jan 2003 15:06:08 -0500
- To: "Michael B. Allen" <miallen@eskimo.com>
- Cc: WWW DOM <www-dom@w3.org>
On Fri, 2002-10-11 at 16:16, Michael B. Allen wrote: > DOMSubtreeModified events "may be fired after a single modification to the > document or, at the implementation's discretion, after multiple changes > have occured." > > It would be nice if there were a processSubtreeModifiedEvents function that > would dispatch DOMSubreeModified events without resorting to employing > another thread. I'm using C but I can imagine with Java or any other > language it may not aways be easy or practical to make your code thread > safe. > > My UI needs to redraw when a subtree is modified but I don't want to > introduce the complexity of using a thread to draw the UI in response to > these events. I would much rather just call processSubtreeModifed at > strategic locations. > > Thoughts? >From my current understanding, all applications will use a separate thread to redraw the view if necessary and, instead of doing so everytime a modification occurs, will do so at specific intervals. You put the modification events (not necessarily or only the DOM ones) in a queue and the separate thread checks the queue to check if there is work to be done. This permit optimizations if more than one modification occurred. Handling the modifications and drawing actions in one thread would result in a slow UI imho. Philippe
Received on Wednesday, 29 January 2003 15:06:17 UTC