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

[Bug] Long Script Blocking time when adding data with WKT #2058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

delfrrr
Copy link
Contributor

@delfrrr delfrrr commented Dec 12, 2022

...feature.properties is blocking UI for few seconds when addling large WKT files.
Test datasets: big-WKT.csv.zip


// try parse as wkt
if (!parsedGeo) {
if (geoString.length && geoString[0] === '{') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not exactly sure when this function is used, but generally this would not be a safe change., Strings may start with spaces and sometimes JSON geometry can be an array.

Might be better to check if the first char is an uppercase letter and if so attempt to parse as WKT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, will rewrite it 🙌

Signed-off-by: Vladi Bilonenko <bilonenko.v@gmail.com>
@delfrrr
Copy link
Contributor Author

delfrrr commented Jun 14, 2023

@ibgreen any blockers to merge?

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.

None yet

2 participants