-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter keys/values based on filter results #15
Comments
Update on this: @zmofei is gearing up to start working on this. We don't have a timeline yet, but currently @zmofei is working on learning the code and how to approach this problem before fully scoping the feature. We have early data to suggest that vector tile shaving + modern stylesheets using GL expressions can be combined for large size savings. This issue then becomes paramount in that GL expressions are explicit about what fields might be needed for expression evaluation in the client and if we can develop that whitelist we can probably further drop shaved sizes by letting go of fields not in that whitelist. So, shaving properties (this issue) + modern stylesheets using GL expressions likely == the most possible cost savings. @zmofei will keep this ticket updated with any major progress made or blockers encountered over the next month or so. |
@zmofei per chat, you've made a bunch of progress on this issue. Could you drop a note here summarizing progress so far and next steps? |
hey @springmeyer, sorry for reply so late (concentrate on coding and missed some tickets) As we sync, now I finished working on the K/V filter with coding and some test. Now we support get the properties key from:
The latest work is committed to What one thinks is that we need to discuss about this: this is the big change for vtshaver since it will auto remove the unused properties from tiles, do we need a version control to decrease the possibility of damage the used online related repos? I mean now we used the param Next step for this feature is:
|
Excellent work @zmofei - thanks for the update. I'll review the code later today and provide my feedback on next steps. My sense is that we should be able to test this new functionality enough in staging to build confidence in rolling out this feature in a way that would not break any existing usecases (and therefore that we don't need to version with |
I draw a diagram, The grey part is what the previous version does, and the blue part is what PR#20 does, in PR#20 we added the following process:
The above was finished in #20 (comment) (Nov 22) Current states:
To extra the properties we need to:
After fixing this issue, I think the next step is to:
|
👋 @springmeyer, deployed on the staging. And create an compare page. Also, I made an auto compare 'tool' which can get the tiles around the given center the zoom lever 5 to 16, and auto compares 3 version:
The code is in the Here is the result by the center https://plot.ly/~zmofei/2.embed In the pic, we compared the style cc w/ @chriswu42 @suntony |
That is an awesome result @zmofei - that indicates that shaving properties is and equal or sometimes even greater size saving than all the other previous shaving optimizations we've done (shaving off layers and features), at least for
Looks identical! That is amazing. Okay, I think this means we should not consider moving to "canary" deploy. For this work I'll create a new ticket to coordinate with the @mapbox/maps-api team. |
Add the feature for vtshaver to shave the unused properties key and value. #15
Add the feature for vtshaver to shave the unused properties key and value. mapbox/vtshaver#15
Per @mapsam and @springmeyer 's thoughts:
In the current implementation we shave layers and whole features, but we do not (yet) drop unused properties from features that we keep. So if we keep a feature we currently decode all its properties and re-add all of its properties. If we only re-add'ed properties that are needed by a given style that would likely result in smaller, more efficient tiles for styles that only reference a few properties per style layer using vector tile sources with many properties.
vtshaver/src/shave.cpp
Line 322 in da0b5ba
Starting to shave off unused properties could be a particularly good optimization for when vector tiles contain many language fields but a given style only needs to display few or none of them for a given layer.
Overall next steps to test this feature:
text-field
and any fields referenced in expressions if the styles uses expressions (https://blog.mapbox.com/announcing-expressions-in-gl-js-a72b55d0a6af)The text was updated successfully, but these errors were encountered: