Using typst content as background very inefficient

Hi, welcome to the forum!

It looks like that the main cause is the misuse of context {โ€ฆ}.
We can make it faster by moving the context keywords (including the one in curvly) to better places and replacing cetz+hide with grid.
However, I canโ€™t fully explain all the phenomenaโ€ฆ

See also Why is the value I receive from context always content? - #2 by laurmaedje

Test results

  • ๐‘Ž โ†’ ๐‘ means ๐‘Ž is faster than ๐‘.
  • The thicker the arrow, the greater the difference.

Source codes are embedded in the PDF.
draw.pdf (43.9 KB)
(Updated, the last version missed some files)

(For security reasons, this forum does not allow uploading any zip file.)

3 Likes