Using Tools => Statistics, my long document has:
127,285 characters
16,018 words
2,401 lines
It consists mostly of one itemized list after another.
Using Tools => Statistics, my long document has:
127,285 characters
16,018 words
2,401 lines
It consists mostly of one itemized list after another.
In the quick test that I did, with a quite artificial document a bit longer than yours and using the bench tool, I have got typesetting times of about 15 to 20 ms, under the Papyrus mode; the typesetting times do not change appreciably switching algorithm. Typing feels smooth (inclduign pressing the Return key).
I am using an Intel i7-6700 processor.
Maybe it could be useful to collect more information on your document, my limited understanding of the line-breaking algorithm tells me that it is only paragraph length and the number of paragraphs that are important.
Have you tried editing operations near the beginning of a long document?
There is no doubt that editing gets slow in long documents. You can try editing the full user manual Help -> Full manuals -> User Manual
. I’m using a fast and recent i7-1185G7 cpu, but still editing get sluggish even when in papyrus. However, the question is, what is causing the slowdown and what can be done about it. As @mgubi has pointed out, we have little information to decide on the cause and it is even less clear what could be the solution. Incremental typesetting may not help (or make things worse) if rendering is the bottleneck.
When I asked about this on the mailing list, Joris said that document scans are sometimes done when not strictly necessary because incrementally handling those cases would be complicated and bug prone.
Still about 15-20 ms for my artificial document, but
about 65-70 ms for the full user manual, one can still work but it is uncomfortable. It does not matter where I type (beginning or end of the document) and whether I use the professional or sloppy line-breaking algorithms.
On the Papyrus mode intuitively I expect only the paragraph I am editing to be object to typeset, while the rest of the document remains as it is, so I would expect the typing to be equally smooth for every document.
so maybe not
but only paragraph length for the current paragraph perhaps (?)
Thanks, this is very interesting, I didn’t know about it. For future reference, this is under Debug -> Bench
and subsequently prints timings of various tasks to the console.
It seems to me that the main factor (in papyrus mode) is paragraph length. I can get 300-400ms typesetting timings by creating a single paragraph, several pages in length. A paragraph of a few words takes less than 1ms.
I have a patch that decreases the time for hyphenation (in my benchmarks) by 25%. I’ll give it another try and see if it makes a difference to these timings. If yes, I can clean it up and submit it.
I don’t think it will do much difference, as high-quality line breaking is non-local:
https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap#Minimum_raggedness
I am going to experiment a bit more, as I am curious. It seems to me from editing the full manual that there is an influence of the full document on the speed of typing of a single paragraph, and I do not understand why.