-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add a per-tree cache into the obligation forest #31349
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 a per-tree cache into the obligation forest #31349
Conversation
cc @jroesch |
@nikomatsakis I believe you raised a point earlier that you were considering fully persistent hash maps in the per-tree state as a means to simplify the interface between the It seems like using a |
Not very strongly. Something like snapshottable might be better, though we'd have to think about how it works (in particular, how the actions are accumulated -- maybe you could create a "handle" to the main value that also collects the undo actions locally or something). The other option would be just hard-coding the fact that the per-tree state is a map, and parameterizing |
Sorry for the delay reviewing. This looks basically fine to me -- at little hacky, but well-documented as such :) @bors: r+ |
📌 Commit 35d6efb has been approved by |
…he, r=aturon Have the `ObligationForest` keep some per-tree state (or type `T`) and have it give a mutable reference for use when processing obligations. In this case, it will be a hashmap. This obviously affects the work that @soltanmm has been doing on snapshotting. I partly want to toss this out there for discussion. Fixes #31157. (The test in question goes to approx. 30s instead of 5 minutes for me.) cc #30977. cc @aturon @arielb1 @soltanmm r? @aturon who reviewed original `ObligationForest`
Nominating for beta since this regression was pretty significant. |
Approving for backport, although another option might to revert the change that introduced the |
@nikomatsakis beta is going to become stable in 10 days, will this one this be backported until then? |
I opted to revert the change on beta, because this did not backport entirely cleanly: #31851 |
Have the
ObligationForest
keep some per-tree state (or typeT
) and have it give a mutable reference for use when processing obligations. In this case, it will be a hashmap. This obviously affects the work that @soltanmm has been doing on snapshotting. I partly want to toss this out there for discussion.Fixes #31157. (The test in question goes to approx. 30s instead of 5 minutes for me.)
cc #30977.
cc @aturon @arielb1 @soltanmm
r? @aturon who reviewed original
ObligationForest