Turfjs / Turfjs/turf

turf.dissolve pegs cpu and does not return

Open
#2,832 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

polyclip-ts
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

The enclosed javascript file contains a feature collection of 9 tabblocks.

turf.dissolve works instanstaneously if one of the tabblocks is removed. Otherwise it does not return and the cpu is running at 100+%

The code will run with the good 8 tabblocks as-is. Comment line 57 to avoid filtering the one other tabblock that causes the issue.

We are able to load the feature collection into geojson.io and visualize and select all 9 of the component features (see image below)

This is running with turf 7.2.0, node version 20.16, on RHEL 8.10

vm_app_user@oocii001-l2-stg:ahero$ grep turf package.json
    "@turf/turf": "^7.2.0",

vm_app_user@oocii001-l2-stg:ahero$ node -v
v20.16.0

vm_app_user@oocii001-l2-stg:ahero$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.10 (Ootpa)

turftest.txt

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the attached turftest.txt reproduction with all 9 tabblocks, then comment line 57 to compare it with the working 8-tabblock case. Trace the turf.dissolve call and verify that the full feature collection returns without pegging the CPU; the issue reports Turf 7.2.0 on Node 20.16 and RHEL 8.10.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.