I am sure someone will correct me if I am wrong... The editor does not handle all user events.The use a hybrid model.
There are things that are taken out by watching changes in DOM (e.g. typing, pasting..). Extractors are used for this...like Typing Extractor. These changes are then applied to underlying XML model, in turn used to calculate operations. Other things are handled before broswer does, like hitting Enter, bullets etc XML model is modified first in this case then rendered to HTML in DOM. There is also a third case, like in pasting. Browser is allowed to paste somewhere off screen, paste is observed , XML model is modified, then DOM is updated. It seems it has more to do with flexibility of allowing such Rich Text interaction than performance improvements for OT. Etherpad was plain text (adding rich text slowly now?) and prolly did not care of this level of control on how contents are handled. More here: http://www.youtube.com/watch?v=EuXApEulIzc On Fri, May 11, 2012 at 2:23 AM, Paulo Pires <[email protected]> wrote: > As far as I can tell, and if I'm not misunderstanding your question, a > local local operation happens immediately, following the intent of > having an "Optimistic UI", as Google called it. Only remote operations > are transformed and then redrawn. > > Could it be that Etherpad has no such distinction? > > Btw, have you read the Operational Transform (OT) whitepaper? > > Cheers, > PP > > On 10/05/12 21:21, Dylan Dandelion wrote: > > If I understand correctly, the Wave editor handles user events and > > processes them to generate operations, which are then applied to the > > document result in the visual rendering of the operation. > > > > This approach is different from Etherpad, which finds DOM nodes that have > > changed at regular intervals, and then generates operations, sanitizes > the > > input and redraws the actual DOM. > > > > What are some of the advantages and disadvantages of the event-driven > > approach versus the diff-ing approach? Why did Wave choose to implement > the > > editor using the event-driven approach? > > > > -- > Paulo Pires > >
