Skip to content

Refactor: remove SymbolInstancesArray, SymbolQuadsArray - #4217

Merged
anandthakker merged 3 commits into
masterfrom
refactor-symbol-instances
Feb 7, 2017
Merged

anandthakker merged 3 commits into
masterfrom
refactor-symbol-instances

Conversation

@anandthakker

@anandthakker anandthakker commented Feb 6, 2017 •

Copy link
Copy Markdown
Contributor

We aren't using SymbolInstancesArray (and SymbolQuadsArray) now, and will need a different approach when we revisit cross-source placement, so this PR removes them, in favor of storing the necessary state down on each SymbolBucket instance (rather than at the WorkerTile level).

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

@anandthakker

Copy link
Copy Markdown
Contributor Author
benchmark master 7b2b879 refactor-symbol-instances 2d7b354
map-load 169 ms 118 ms
style-load 97 ms 97 ms
buffer 1,036 ms 1,010 ms
fps 60 fps 60 fps
frame-duration 4.7 ms, 0% > 16ms 4.7 ms, 0% > 16ms
query-point 0.82 ms 0.90 ms
query-box 60.38 ms 62.08 ms
geojson-setdata-small 7 ms 4 ms
geojson-setdata-large 154 ms 143 ms

Comment thread package.json
"remark-html": "^5.0.1",
"request": "^2.79.0",
"sinon": "^1.15.4",
"st": "^1.2.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's here. Is that dependency not working for you?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah. Yeah, it wasn't working for me -- e.g. the start-debug script in the root package.json failed to find st.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh right, start-server uses the st CLI. 👍

@anandthakker

Copy link
Copy Markdown
Contributor Author

@lucaswoj @jfirebaugh @mollymerp This is mostly done, as discussed here: #4186 (comment).

There's one render test mysteriously failing (because a road turned 180 degrees from waht's expected). Chasing that down now, but I think this is probably okay to 👀 nonetheless.

@mourner

mourner commented Feb 6, 2017

Copy link
Copy Markdown
Member

This is awesome!

@anandthakker
anandthakker force-pushed the refactor-symbol-instances branch from 3ae4de3 to 5fbb68b Compare February 7, 2017 00:19
These StructArrays were introduced with an eye towards the 'cross-source
symbol placement' project, as a way to transfer all the information
needed to re-place and then render symbols from the thread where each
vector tile is parsed parsing occurs to the main thread for placement
and rendering.

However, data-driven styling presents a problem for this approach: for
DDS, populating the paint attribute arrays requires both the feature
property information (from the VT-parse thread) and the symbol layout
information (because it dictates which features' paint attributes should
be included).

So, we aren't using SymbolInstancesArray (and SymbolQuadsArray) now, and
will need a different approach when we revisit cross-source placement.
@anandthakker
anandthakker force-pushed the refactor-symbol-instances branch from 5fbb68b to 26ce1f3 Compare February 7, 2017 00:32
@anandthakker
anandthakker requested a review from lucaswoj February 7, 2017 00:33
@anandthakker

Copy link
Copy Markdown
Contributor Author

@lucaswoj rebased onto master - this should be good to go 🤞

@anandthakker
anandthakker merged commit bce7afc into master Feb 7, 2017
@anandthakker
anandthakker deleted the refactor-symbol-instances branch February 7, 2017 18:50
mapsam pushed a commit that referenced this pull request Feb 8, 2017
* Refactor: remove SymbolInstancesArray, SymbolQuadsArray

These StructArrays were introduced with an eye towards the 'cross-source
symbol placement' project, as a way to transfer all the information
needed to re-place and then render symbols from the thread where each
vector tile is parsed parsing occurs to the main thread for placement
and rendering.

However, data-driven styling presents a problem for this approach: for
DDS, populating the paint attribute arrays requires both the feature
property information (from the VT-parse thread) and the symbol layout
information (because it dictates which features' paint attributes should
be included).

So, we aren't using SymbolInstancesArray (and SymbolQuadsArray) now, and
will need a different approach when we revisit cross-source placement.

* Add missing st dependency

* Remove unused quadCount member
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.

3 participants