mapbox / mapbox/MapboxGeocoder.swift
MBPlacemark should store property values parsed from GeoJSON
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 133
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Each property that’s parsed out of MBPlacemark’s backing GeoJSON is potentially expensive, especially when accessed frequently. It’s easy to come up with a pathological case that involves putting addressDictionary fields into a table view cell. Since the backing GeoJSON is immutable, these property values should be lazily computed then stored for the lifetime of the object.
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
Locate MBPlacemark and inspect how its backing GeoJSON supplies properties such as addressDictionary. Confirm which values are recomputed on repeated access, then add lifetime caching while preserving the existing property behavior. Done means repeated property access no longer reparses the immutable GeoJSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100