Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Every tile parser thread needs its own Style object #881

Closed
kkaefer opened this issue Feb 14, 2015 · 5 comments
Closed

Every tile parser thread needs its own Style object #881

kkaefer opened this issue Feb 14, 2015 · 5 comments
Assignees
Labels

Comments

@kkaefer
Copy link
Member

kkaefer commented Feb 14, 2015

Style objects are currently shared among several threads. They also modify the style object. #879 addresses some of this by locking StyleBucket objects. Instead, every tile worker should have its own copy of the Style object so that we can't mutate it while the tile parser is currently using it. In addition to that, Style objects should be fully const; right now we're resolving parse time constants depending on the current tile's zoom level and change the Style object.

@ljbade
Copy link
Contributor

ljbade commented Feb 14, 2015

Not sure if this was fixed already but being able to load/save the style's state without waiting for the style JSON to load is needed for Android to restore state when a backgrounded application is terminated then restarted in the foreground.

@kkaefer
Copy link
Member Author

kkaefer commented Feb 14, 2015

Nope, we're currently parsing the Style object in the UI thread, unless it's loaded via HTTP. This is a different issue though and captured in #883.

@kkaefer kkaefer added this to the iOS Beta milestone Feb 17, 2015
kkaefer added a commit that referenced this issue Feb 18, 2015
kkaefer added a commit that referenced this issue Feb 18, 2015
and remove a few unused variables

refs #881
This was referenced Feb 18, 2015
@incanus
Copy link
Contributor

incanus commented Mar 7, 2015

@kkaefer How critical do you think this is? Is this something that we can push from the iOS beta milestone? What is the practical possibility of multi-threaded mutation right now?

@kkaefer
Copy link
Member Author

kkaefer commented Mar 8, 2015

Not critical for Beta. There are a few other patches (cf235c6, e00bae4, c30bb1a, e8389d8, 0151fe6) in master that alleviate most of this.

@incanus incanus removed this from the iOS Beta milestone Mar 8, 2015
@kkaefer
Copy link
Member Author

kkaefer commented May 18, 2015

This is no longer an issue.

@kkaefer kkaefer closed this as completed May 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants