PgBiel / typst-tablex

More powerful and customizable tables in Typst
MIT License
370 stars 12 forks source link

Optimize map parameters #113

Closed PgBiel closed 7 months ago

PgBiel commented 7 months ago

Don't run unnecessary for loops to map columns, rows etc. if those parameters weren't specified. Make sure to disable whitespace changes when viewing the diff.

Seems to save about 10% compilation time (300 ms on unreleased Typst 0.11.0) on the test document.

Also adds some tiny extra checks regarding the length of arrays returned by map-rows and map-cols.