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

Implement t_data_slice API for data extraction from 0 & 1-sided views #483

Merged
merged 5 commits into from
Mar 14, 2019

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Mar 12, 2019

This PR implements the new data_slice API for zero and one-sided views. Benchmarking shows a consistent 10-15% improvement in calls to to_json, but I'd love to have that validated on other machines.

Changes:

  • t_data_slice allows for data extraction with bounds checking; this solves an issue with perspective-hypergrid calling get_columns with row indices that were larger than the number of rows within the engine. The use of at() instead of operator[], IIRC, should prevent undefined behavior from occurring when we index into the underlying slice. @texodus @timkpaine please look over this closely if possible.
  • perspective.js now pulls column names and row paths from the data slice, instead of making calls to the underlying C++ view.
  • Shared pointers are used for the data_slice and underlying slice vector, but other metadata are stored as copies and returned as const references in order to make it easier to interface with from the JS binding.

@texodus texodus merged commit 6aae31b into master Mar 14, 2019
@texodus texodus deleted the data-slice branch March 14, 2019 15:26
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