-
Notifications
You must be signed in to change notification settings - Fork 64
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
Catch infinite loop when passing sweep line over endpoints (#95) #97
Conversation
Pull Request Test Coverage Report for Build 319
💛 - Coveralls |
Thanks for the PR @OliverColeman Yeah, the behavior of this lib as it runs out of heap space is frustrating as I recall - slows down and slows down and slows down and then 15 minutes later finally crashes. I assume this will help it fail earlier. As far as test cases to trigger this behavior... do you have any coordinates that will trigger this that are of reasonable size? Like not kilobytes, not megabytes of json Cheers |
I do not have compact test cases, alas. Maybe a script could be made to randomly generate polys to try and trigger failures..? |
What I did before when I had large data which triggered a bug, was to cut the data in half, see if bug is still there, and basically repeat this until you have the absolute minimum data to replicate the issue. |
@mfogel More info including small test case here: #95 (comment) |
So for this PR, I was thinking - could we make those max queue size and sweepLine length values configurable by environment variable? The values you have there could be used as defaults if the environment variables aren't set. Something like Oh, and we should document those env variables in the README too. |
Done :) |
bump This one small PR is going to make our production site so much more stable... :) |
Thanks for the bump - Sorry I fell asleep at the wheel there 😜 I would like to let this sit on master for a few days before releasing a new version, but please give me another bump if I haven't done so by next weekend. |
Included in release |
This will at least allow gracefully dealing with the infinite looping, instead of chewing up heap space before ultimately crashing the entire process... Perhaps the limits could be 100,000 rather than 1,000,000 though?