Why does Typst crash with large amounts of content?

Hi. It sounds like you are pushing the limit of what Typst can do, similar to How to optimize a `query` that leads to severe performance problems?, but the code doesn’t actually do any computations, maybe.

Without a concrete example with a data sample, no one can know for sure. Your code snippet is missing parts of code and any data sample. See https://sscce.org/. Also, what is the “tp” file extension?

Here is what I think the whole template looks like with some data:

#set page(paper: "a4", margin: (x: 0.5cm, y: 0.5cm))
#set text(size: 8pt)

#let header-labels = ("a", "b", "c")
#let header-keys = ("x", "y", "z")

#table(
  columns: header-labels.len(),
  inset: (x: 4pt, y: 3pt),
  stroke: 0.4pt + rgb(..(80,) * 3),
  fill: (col, row) => if row == 0 { rgb(..(245,) * 3) } else { white },
  table.header(..header-labels),
  ..header-keys,
)

You can also use luma() for grayscale colors.

1 Like