Re: [NTG-context] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Hans Hagen

On 12/3/2020 12:04 PM, Stephen Gaito wrote:


- very large (1,000+ pages),


not that large, literate code is often verbatim so that doesn't take 
much runtime either



- highly cross-referenced documents,


ok, that demands runs


- with embedded literate-programmed code (which needs
   concurrent compiling and execution),


you only need to process those snippets when something has changed and 
there are ways in context to deal with that (like \typesetbuffer and 
such which only processes when something changed between runs)



- containing multiple MetaFun graphics,


those don't take time assuming effecitne metapost code
 Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Taco Hoekwater


> On 3 Dec 2020, at 12:04, Stephen Gaito  wrote:
> 
> 1. Are there any other known attempts to parallelize context?

Not that I know of, except for the tricks I mentioned in my earlier mail today.

> 2. Are there any other obvious problems with my approach?

The big problem with references is that changed / resolved references can 
change other (future) references because the typeset length can be different,
shifting a following reference to another page, which in turn can push
another reference to yet another page, perhaps changing a page break, et 
cetera. 

That is why the meta manual needs five runs, otherwise a max of two runs would 
always be enough (assuming no outside processing like generating a bibliography 
or index is needed). So your —once approach may fail in some cases, sorry.

Actually, the meta manual really *needs* only four runs. The last run is the 
one 
that verifies that the .tuc file has not changed (that is why a ConTeXt document
with no cross-references at all uses two runs, and is one of the reasons for 
the existence of the —once switch).

Depending on your docs, you may be able to skip a run by using —runs yourself.

Best wishes,
Taco



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___