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

refactor: More exoClasses have stateShape metadata #7445

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

erights
Copy link
Member

@erights erights commented Apr 18, 2023

Adds some of the stateShape metadata needed to get the benefit of #7444

Even when the shape of each property in the stateShape record is merely M.any(), we still get the full benefit of #7444 .

With more accurate shapes, which can be incrementally contributed later, we'll also get better error checking. If #6432 happens, then these more accurate shapes might also reduce storage as well as serialization/deserialization time and allocations. We'll see.

@erights erights self-assigned this Apr 18, 2023
@erights erights changed the base branch from master to markm-state-proto-2 April 18, 2023 06:13
@erights erights marked this pull request as draft April 18, 2023 06:18
@erights erights force-pushed the markm-more-stateShapes branch from 009aca0 to b72e85f Compare April 18, 2023 06:22
@erights erights marked this pull request as ready for review April 18, 2023 06:22
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Looks fairly mechanical. I didn't review every item but I trust the changes since tests are passing.

@dckc dckc removed their request for review April 18, 2023 15:16
@erights erights force-pushed the markm-more-stateShapes branch from b72e85f to 50c9fe4 Compare April 18, 2023 16:35
@erights erights changed the base branch from markm-state-proto-2 to master April 18, 2023 16:36
@erights erights added the automerge:rebase Automatically rebase updates, then merge label Apr 18, 2023
@Chris-Hibbert
Copy link
Contributor

  1. Is this only a benefit for high cardinality objects? Is it clear that it's not a net cost for low-cardinality objects? AuctionBook is expected to be low-cardinality. I didn't look at others.
  2. Is there no value to spending a little time making the types tighter than M.any()?

@mergify mergify bot merged commit 5685735 into master Apr 18, 2023
@mergify mergify bot deleted the markm-more-stateShapes branch April 18, 2023 17:17
@erights
Copy link
Member Author

erights commented Apr 18, 2023

  1. Is this only a benefit for high cardinality objects? Is it clear that it's not a net cost for low-cardinality objects? AuctionBook is expected to be low-cardinality. I didn't look at others.

It is only a performance benefit for high cardinality objects. So yes, AuctionBook was lower priority than many others. For this PR, I just picked a few exoClasses to be the first experiment to see what difference #7444 makes, and to see if it breaks anything. As do this to more exoClasses, we should prioritize better.

  1. Is there no value to spending a little time making the types tighter than M.any()?

Yes! But not in this PR. There are two anticipated benefits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants