Skip to content
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

Remove feature state (very maybe possibly ready) #7696

Closed
wants to merge 37 commits into from

Conversation

peterqliu
Copy link
Contributor

@peterqliu peterqliu commented Dec 12, 2018

retry of #7669


Addresses #6889

Depending on parameters specified, enables feature state removal at the source, feature, and property levels.

screen shot 2018-12-11 at 1 35 34 pm

screen shot 2018-12-11 at 1 36 02 pm

screen shot 2018-12-11 at 1 39 01 pm

Effect on setFeatureState perf:

screen shot 2018-12-10 at 4 20 54 pm

cc/ @asheemmamoowala

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

src/ui/map.js Outdated Show resolved Hide resolved
src/ui/map.js Outdated Show resolved Hide resolved
@@ -1518,30 +1728,6 @@ test('Map', (t) => {
});
});

t.test('no render after idle event', (t) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests also look accidentally removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a nit now, but it looks like these two tests changed location in the file. Let's put them back where they started so it's easy to tell in the diff that nothing's changed.

@asheemmamoowala asheemmamoowala force-pushed the removeFeatureState-redux branch from 7684cec to d944552 Compare December 14, 2018 23:20
src/source/source_state.js Outdated Show resolved Hide resolved
@@ -0,0 +1,76 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three benchmark tests here look to be almost identical with the exception of what's passed to setFeatureState and removeFeatureState in bench. You could probably create an overarching remove_paint_state benchmark that has sub-tests for each individual test, in the same vein as the Expressions and Layers benchmarks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanhamley was looking to do just that! thanks for the tip, was able to crib the format from Layers. consolidated the benches here d048d22

Copy link
Contributor

@asheemmamoowala asheemmamoowala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nearly there! 🛩
Commit history could use some cleanup to ensure a correct and clean merge back to master.

src/source/source_state.js Show resolved Hide resolved
src/source/source_state.js Outdated Show resolved Hide resolved
src/source/source_state.js Show resolved Hide resolved
src/source/source_state.js Outdated Show resolved Hide resolved
test/unit/ui/map.test.js Show resolved Hide resolved
@peterqliu peterqliu force-pushed the removeFeatureState-redux branch from 7581f4b to b40cb44 Compare January 4, 2019 22:22
src/ui/map.js Outdated Show resolved Hide resolved
src/ui/map.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ChrisLoer ChrisLoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few small comments, but overall this is looking good to me. 🚀

@peterqliu peterqliu force-pushed the removeFeatureState-redux branch from c646648 to 4e076e1 Compare January 10, 2019 01:09
lint

squash
@peterqliu peterqliu force-pushed the removeFeatureState-redux branch from 4e076e1 to 0612f65 Compare January 10, 2019 01:16
@peterqliu peterqliu mentioned this pull request Jan 10, 2019
5 tasks
@peterqliu
Copy link
Contributor Author

got a bit carried away with squashing-- moving things over to #7761

@peterqliu peterqliu closed this Jan 10, 2019
@asheemmamoowala asheemmamoowala deleted the removeFeatureState-redux branch January 23, 2019 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants