openlayers / openlayers/openlayers
Dashed line performance
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12.6k
- Forks
- 3.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 21
Description
Describe the bug
Long dashed lines reduce render performance by a lot.
See also #5520 and #5645
To Reproduce
- Checkbox changes styles from dashed to continuous line
- Select input switches different features
- Compare zooming in / out with the different options
- Non-dashed lines are fine.
- Subdividing the line into multiple segments doesn't help.
- Using a MultiLineString (as suggested in one of the linked issues) with multiple short line segments instead of a LineString with multiple segments doesn't seem to help either.
- Using multiple Features with short lines helps, though the dashes are no longer continuous, which looks bad especially on low zoom levels.
Does openlayers simplify the subdivided geometry again?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CodeSandbox reproduction linked in the issue and compare zooming performance for dashed and continuous lines across the listed geometry and feature options. Read the related issues #5520 and #5645 for prior investigation. Done means identifying and addressing the dashed-line performance problem without losing continuous dash rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100