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

Add earcutr #653

Open
deanm0000 opened this issue Jun 24, 2024 · 3 comments
Open

Add earcutr #653

deanm0000 opened this issue Jun 24, 2024 · 3 comments

Comments

@deanm0000
Copy link

deanm0000 commented Jun 24, 2024

I noticed that the deck.gl layers does earcut on the client but it'd be nice to create geometry source data that has already been earcutted for better performance.
https://github.com/frewsxcv/earcutr

@kylebarron
Copy link
Member

In theory we could bind to earcutr here, but it won't be that useful for deck.gl-layers. The output of earcut is a different length of data than the number of rows, so it doesn't really fit into an Arrow table or Parquet file. And on the frontend earcut is already done on 8 worker threads, so it's not a big slowdown

@deanm0000
Copy link
Author

I'm getting, what seems to be, significant time spent earcutting. Here's a profile...

image

I'm not sure what you mean about a different number of rows. I'm thinking that each row is its own polygon that gets earcut independently of other rows and so the new List that makes up the polygon will be a different length but I don't know why it'd be a different number of rows.

@kylebarron
Copy link
Member

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

No branches or pull requests

2 participants