Skip to content

Conversation

@alexandru-popescu
Copy link

This is a functional fix for polygon parsing; the bug that is addressed by the fix is that polygons with > 1000 lines take a long time to parse.
This is because the loop goes through the polygon parsing for each coordinate entry: this is unnecessary and degrades performance a lot: more coordinates results in more unnecessary loops.
The fix cuts the loop for polygons after the first parsing.
Of course, this is a sort of a hack ... the correct way to fix this would be to follow the top-down structure of the kml instead of looping directly over all coordinates, just to go back to the parent, parse the parent and then do it all over again ...

This is a functional fix for polygon parsing; the bug that is addressed by the fix is that polygons with > 1000 lines take a long time to parse.
This is because the loop goes through the polygon parsing for each coordinate entry: this is unnecessary and degrades performance a lot: more coordinates results in more unnecessary loops. 
The fix cuts the loop for polygons after the first parsing.
Of course, this is a sort of a hack ... the correct way to fix this would be to follow the top-down structure of the kml instead of looping directly over all coordinates, just to go back to the parent, parse the parent and then do it all over again ...
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