Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize typesetter mode handling #2042

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alerque
Copy link
Member

@alerque alerque commented Jun 5, 2024

This is awkward. I was working on something else and thought I spotted an easy way to optimize the typesetter look and save quite a bit of time. I threw it in and kept working on my other thing intenting to come back and benchmark it later.

It turns out this broke the world. Some tests started generating infinite pages and building the manual started hanging completely.

This means that typesetter:leaveHmode() is doing work even when already in vertical mode. I would have expected all the node queue processing to be a noop.

This is almost certainly intertwined with other typesetter:pushBack() issues that have surfaced, but perhaps the fact that this function is doing work outside of its labeled scope is a clue where the algorythm is breaking down.

@Omikhleia
Copy link
Member

Yep, I had seen this too: leaveHmode is also where the page building logic is triggered (and even if the horizontal queue is empty, we might have additional things in the vertical queue: penalties, vglues etc.)

@alerque alerque deleted the branch sile-typesetter:develop June 6, 2024 12:34
@alerque alerque closed this Jun 6, 2024
@alerque alerque reopened this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants