-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 Polygon triangulation #2305
Conversation
…nly exit from return statements).
…he component needed.
… form requiring the slope which breaks down for vertical lines.
I suspect you'll get additional peformance gains by removing |
For performance, can we look at:
|
Also fixes #1089. |
@@ -512,6 +512,25 @@ define([ | |||
}; | |||
|
|||
/** | |||
* The modulo operation that also works for negative dividends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to CHANGES.md. Once we know the performance gain, we should also mention it.
Code looks fine. @bagnell can you also profile this as part of the performance testing? |
Total time triangulating in ms.
|
CC @DavidHudlow |
Very nice. Let's look at subdivision in a separate pull request. |
For #2074.
I still want to look at the performance, but the code can be reviewed. You might want to look at the individual commits before and after the fourth one; I moved all of the functions around so they were defined before they were called.
@pjcozzi This doesn't change the subdivision as we discussed. If its better than how its done now, it'll be in a separate PR.