Skip to content

WIP: update to earcut 3.2.3#131

Closed
mrgreywater wants to merge 2 commits into
mapbox:masterfrom
mrgreywater:update-3.2.3
Closed

WIP: update to earcut 3.2.3#131
mrgreywater wants to merge 2 commits into
mapbox:masterfrom
mrgreywater:update-3.2.3

Conversation

@mrgreywater

@mrgreywater mrgreywater commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Work in Progress

Update all changes from earcut.js 3.2.3, including test fixtures
It appears this PR will degrade performance, likely because of many integer<->floating point conversions. Need to investigate.

@mourner

mourner commented Jul 2, 2026

Copy link
Copy Markdown
Member

Ah apologies, I already started a maintenance pass in parallel, but with a different approach - modernizing infrastructure / test setup first, only then moving to porting the actual code changes. Created the PR here #132 — perhaps I could reuse some of your work there?

@mrgreywater

Copy link
Copy Markdown
Collaborator Author

Oh well, didn't know you already started working on it. I'll stop for now. Take any code you like, maybe I'll look into the performance stuff after you have merged yours ;)

@mourner

mourner commented Jul 3, 2026

Copy link
Copy Markdown
Member

Migration is complete — sorry I didn't warn about it earlier, but having this PR as reference was genuinely useful. I also borrowed a few additions from it (refine result in viz, and tightened warnings). Regression in this PR was indeed due to constant float/int conversion in hot loops, whereas the version in my PR does the double conversion once on input.

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