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

styles GYP should bundle sprites #674

Closed
incanus opened this issue Dec 2, 2014 · 6 comments
Closed

styles GYP should bundle sprites #674

incanus opened this issue Dec 2, 2014 · 6 comments
Labels
build GL JS parity For feature parity with Mapbox GL JS performance Speed, stability, CPU usage, memory usage, or power usage

Comments

@incanus
Copy link
Contributor

incanus commented Dec 2, 2014

Currently the gyp/styles.gypi only bundles the stylesheets, not the sprites. It we add the sprites, plus finish up asset:// handling over in #579, we can modify the styles to read local sprite assets and save on load time in most use cases.

Probably doesn't make sense to mirror this whole bundling + asset:// handling in gl-js since resources there will always be remote.

/cc @mapbox/gl

@incanus incanus added GL JS parity For feature parity with Mapbox GL JS build performance Speed, stability, CPU usage, memory usage, or power usage labels Dec 2, 2014
@ljbade
Copy link
Contributor

ljbade commented Dec 2, 2014

Great idea.

@ljbade
Copy link
Contributor

ljbade commented Dec 2, 2014

@incanus How are you structuring the asset:// stuff. I am planning to set up a platform class similar to how we plug in logging etc on Linux vs iOS.

@mikemorris
Copy link
Contributor

@incanus @ljbade I've started some work on breaking out the FileSource backend over in the caching-http-file-source branch, lets chat briefly about roadmap if this seems like a good direction.

/cc @jfirebaugh

@incanus
Copy link
Contributor Author

incanus commented Dec 2, 2014

How are you structuring the asset:// stuff. I am planning to set up a platform class similar to how we plug in logging etc on Linux vs iOS.

Basic approach for iOS/OS X is:

  1. Assert asset:// scheme (asset://styles/styles/bright-v6.json)
  2. Replace it with empty string (styles/styles/bright-v6.json)
  3. Parse out path, file basename, and extension (styles/styles, bright-v6, json)
  4. Pass these to -[NSBundle pathForResource:ofType:inDirectory:] to locate the bundled asset

@ljbade
Copy link
Contributor

ljbade commented Dec 16, 2014

Just saw this, looks good.

@1ec5
Copy link
Contributor

1ec5 commented Oct 30, 2015

We’re getting rid of style bundling altogether in #674.

@1ec5 1ec5 closed this as completed Oct 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build GL JS parity For feature parity with Mapbox GL JS performance Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

4 participants