Daniel Dekany wrote:
> I edit a ~1MB DocBook 5 XML. Me many others have a good habbit of
> often unconsciously pressing Ctrl+S. That will block me in work for
> several seconds; very inconvenient. I wonder what takes so long. Could
> this process be optimized somewhat? From the footer messages I
> conclude it's not even the validation, and writing out 1MB of XML,
> even indented and like, couldn't possibly take so long. (Ideally,
> saving should happen in parallel with editing, but certainly that
> would requite copy-on-write capability on the in-memory document
> representation.)
> 

--> Saving a DocBook 5 (RELAX NG) document as an indented file was slow,
but the problem is solved now. It's 10 times faster than before[*].

Example:

* Using default options: indentation, references to char. entities, etc,
saving a 2,274,219 bytes long DocBook 4 document takes less than 600ms
on my Linux laptop (having a slow disk drive like most laptops).

* Saving the same document but converted to DocBook 5 now also takes
less than 600ms.

--> We now find that *loading* this large DocBook 5 document takes an
excessively long time compared to its DocBook 4 variant. We'll try to
improve this situation too.

---
[*] No hacks, no heuristics, simply replacing a very small piece of code
which bypassed our incremental validator.


Reply via email to