Repository navigation
chore(generator): remove write-only twinOf and consumedEnd - #77
Merged
Merged
Conversation
partitionFaces() fills twinOf and assembleStrokes() fills consumedEnd, but neither is ever read; nextEdge() and walkFrom() rely on outgoing, link and consumedSeg instead. Claude-Session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq
Owner
|
Hey. Thanks a lot for the simplification. I will merge it. Just curious. Did you notice any performance issues or bugs caused by this? |
Contributor
Author
|
Thanks! No, I didn't see any bug or measurable slowdown from it. Both were flagged by a static check I run for collections that are written but never read, and I confirmed by hand that nothing reads them. The only cost was a few extra Map/Set inserts per glyph, so this is just cleanup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two collections in the geometry pipeline are filled but never read:
partitionFaces()(geometry/partition.ts) buildstwinOffor every half-edge pair, butnextEdge()and the face walk only useoutgoingandhalfEdges.assembleStrokes()(geometry/strokes.ts) adds both ends of each walked segment toconsumedEnd, but the walk checksconsumedSegandlink, neverconsumedEnd.This PR deletes both (10 lines, deletion only). No behavior change, so bundles and scoreboard baselines should not move.
Checked locally:
bun --conditions=tegaki@dev test src/geometryinpackages/generator: 252 pass, 0 fail. One earlier run hit a 5s timeout on a single test; it did not reproduce on rerun, and the unmodified tree also passed 252/252.tsgoat the root: no errorsbiome linton the two files: cleanhttps://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq