Possible optimization in v2 branch
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 52
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
The geometry decoding in https://github.com/mapbox/vector-tile/blob/2.x/include/mapbox/vector_tile/handlers.hpp works by first creating "multi" geometries of the given type. If later the geometry turns out to only contain a single point, linestring, or polygon, the first geometry of the "multi" is returned. In practice most geometries are probably not multi, so creating this extra indirection (which internally is a std::vector) and then discarding it could have measurble performance impact.
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 in include/mapbox/vector_tile/handlers.hpp, focusing on the geometry decoding path described in the issue. Compare representative single and multi-geometry cases and measure whether the temporary multi-geometry allocation affects performance. Done means a measured optimization is identified or ruled out without changing decoding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100