Skip to content

Commit

Permalink
Reduce interrupt checks in MCIndexNoder::intersectChains
Browse files Browse the repository at this point in the history
Limit the check to once every 100000 iterations
  • Loading branch information
strk committed May 4, 2023
1 parent 20ca29f commit 3e3f720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/noding/MCIndexNoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ MCIndexNoder::intersectChains()
index.queryPairs([this, &overlapAction](const MonotoneChain* queryChain, const MonotoneChain* testChain) {
queryChain->computeOverlaps(testChain, overlapTolerance, &overlapAction);
nOverlaps++;
GEOS_CHECK_FOR_INTERRUPTS();
if ( nOverlaps % 100000 == 0 ) GEOS_CHECK_FOR_INTERRUPTS();

return !segInt->isDone(); // abort early if segInt->isDone()
});
Expand Down

0 comments on commit 3e3f720

Please sign in to comment.