ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Stephen Gaito <stephen@perceptisys.co.uk>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 1/2
Date: Thu, 3 Dec 2020 16:53:22 +0000	[thread overview]
Message-ID: <20201203165322.2e4bac2b@nn01> (raw)
In-Reply-To: <42ADA9D0-2CE2-4FD6-B245-8C6F8AF2CF11@elvenkind.com>

Taco,

Thanks for your comments... see below...

On Thu, 3 Dec 2020 12:15:46 +0100
Taco Hoekwater <taco@elvenkind.com> wrote:

> > On 3 Dec 2020, at 11:35, Stephen Gaito <stephen@perceptisys.co.uk>
> > wrote:
> > 
> > Hans,
> > 
> > As I said my desktop is elderly... it has a 2.8GHz processor, 16Gb
> > of DDR3 memory, and a couple of old SATA1 hard disks, and only 3Mb
> > of CPU cache...
> > 
> > ... all well past its use by date for single threaded ConTeXt. ;-(
> > 
> > So one way to get better performance for ConTeXt is to invest in a
> > new ultra fast processor. Which will cost a lot, and use a lot of
> > power which has to be cooled, which uses even more power....  
> 
> Startup time can be improved quite a bit with an SSD. Even a cheap
> SATA SSD is already much faster than a traditional harddisk. Doesn’t
> help with longer documents, but it could be a fairly cheap upgrade.
> 
> I can’t comment on how to speed up the rest of what you are doing,
> but generally multi-threading TeX typesetting jobs is so hard as to
> be impossible in practise. About the only step that can be split off
> is the generation of the PDF, and even there the possible gain is 
> quite small (as you noticed already).
> 
> Typesetting is a compilation job, so the two main ways to speed things
> along are
> 
> 1) split the source into independent tasks, like in a code compiler
>    that splits code over separate .c / .cpp / .m / .p etc. files,
>    and then combine the results (using e.g. mutool)
> 

This is basically my approach... *However*, while the dependency graph
for a standard compilation has been engineered to be an acyclic tree,
for a ConTeXt "compilation", the "*.tex" file has a cyclic dependency
on the (generated) "*.tuc" file.

Basically my parallelization "build manager" has to unroll or other
wise reimplement the mtx-context.lua 

```
  for currentrun=1,maxnofruns do
    ...
  end
```

loop until the `multipass_changed(oldhash,newhash)` returns `false`.

Followed by a "pdf-linking" stage (possibly implemented, as you suggest,
by `mutool`) ....

Not great.... but it might work... (and I am willing to give it a
try)...

> 2) precompile recurring stuff (in TeX, that would mean embedding
>    separately generated pdfs or images)
> 
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

      parent reply	other threads:[~2020-12-03 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  9:51 Stephen Gaito
2020-11-30 18:59 ` Hans Hagen
2020-12-02  9:40   ` Stephen Gaito
2020-12-02 13:04     ` Hans Hagen
2020-12-03 10:35       ` Stephen Gaito
2020-12-03 11:15         ` Taco Hoekwater
2020-12-03 12:15           ` Hans Hagen
2020-12-03 17:08             ` Stephen Gaito
2020-12-03 16:53           ` Stephen Gaito [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203165322.2e4bac2b@nn01 \
    --to=stephen@perceptisys.co.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).