-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
pdfRelated to PDF export or PDF embedding.Related to PDF export or PDF embedding.perfRelated to performance and optimization.Related to performance and optimization.regressionSomething that did work before stopped working.Something that did work before stopped working.urgentShould be fixed before the next release.Should be fixed before the next release.
Description
After rebasing my test-suite branch, I noticed some PDF tests getting noticable slower. I pinpointed it to this PR: #7326
This specific test now takes up twice the amount of time:
--- gradient-math-misc ---
// Test miscellaneous
#show math.equation: set text(fill: gradient.linear(..color.map.rainbow))
#show math.equation: box
$ hat(x) = bar x bar = vec(x, y, z) = tilde(x) = dot(x) $
$ x prime = vec(1, 2, delim: "[") $
$ sum_(i in NN) 1 + i $
$ attach(
Pi, t: alpha, b: beta,
tl: 1, tr: 2+3, bl: 4+5, br: 6,
) $The gradient code in typst-pdf generates 31 samples between every stop of a gradient. Since the rainbow gradient already has a lot of stops, this seems to be the culprit. Maybe we can choose the number of samples based on the distance of the stops and or distance of the hue instead? In the rainbow case I think it would be fine to basically omit any extra sampled stops.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pdfRelated to PDF export or PDF embedding.Related to PDF export or PDF embedding.perfRelated to performance and optimization.Related to performance and optimization.regressionSomething that did work before stopped working.Something that did work before stopped working.urgentShould be fixed before the next release.Should be fixed before the next release.