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

Add t_data_slice for data output #473

Merged
merged 6 commits into from
Mar 7, 2019
Merged

Add t_data_slice for data output #473

merged 6 commits into from
Mar 7, 2019

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Mar 6, 2019

This PR begins to abstract the process of getting data out of perspective for use in visualizations/serialization. Right now, we create an intermediate array inside emscripten.cpp that contains the data extracted from the context. The end goal of the PR is to eliminate that intermediate structure—and the logic surrounding it—so as to make the data output API portable and trivial to implement in binding languages.

t_data_slice is a class that contains the underlying slice of data and associated metadata, which allows us to eventually remove the intermediate logic of get_data in emscripten.cpp.

Changes

  • Adds t_data_slice class
  • Adds is_column_only to context construction
  • Moves get_column_extent to independent class

Making the PR so we can discuss and get these changes into mainline before the branch gets too big; I've tried to benchmark these changes but the script seems to be broken on my machine and isn't benching properly.

@texodus
Copy link
Member

texodus commented Mar 7, 2019

Thanks for the PR!

This looks great! I added one small fix for the windows build due to missing std::min on Windows. Benchmarks show a ~10% improvement in JSON generation, which is quite a nice bonus!

@texodus texodus merged commit 4e071bb into master Mar 7, 2019
@texodus texodus deleted the data-slice branch March 7, 2019 10:43
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.

None yet

3 participants