The bug I was chasing yesterday afternoon beingDiavolo now fixed, I made dramatic progress on Diavolo, the refresh speed becoming - as it should be - almost independent of the caret's position in the document. I'm saying almost at this time because it should be totally independent of it only tomorrow, when my code for partial re-serialization on refresh is in. The speed is impressive. Honestly, it's so fast you would not say it's based entirely on JavaScript. And it's not optimized yet ! My goal with Diavolo is the following : a new XUL toolkit element :

<srceditor grammar="..." stylesheet="..."
src="..." />

with helper properties and methods to allow embedders to tune it according to their wishes. Things we're going to add in the near future : autocompletion, folding, auto-indent, and line numbering. Stay tuned...