salsa-rs / salsa

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.
https://salsa-rs.netlify.app/
Apache License 2.0
2.1k stars 143 forks source link

New database design #538

Closed nikomatsakis closed 1 month ago

nikomatsakis commented 1 month ago

Status: Ready

Prototype new database design. See the final commit for a write-up. This is ready to land but I was planning to do a bit more work, in particular removing the use of thread-local state.

Update: I've removed the thread-local state now.

KEY CHANGES

netlify[bot] commented 1 month ago

Deploy Preview for salsa-rs canceled.

Name Link
Latest commit 1bce41f5d68903ca03c7e1222977c5c8f7df24d1
Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/66af3a088db6e50008713708
codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #538 will not alter performance

Comparing nikomatsakis:spindle2 (1bce41f) with master (7bdf51c)

Summary

✅ 1 untouched benchmarks

nikomatsakis commented 1 month ago

@MichaReiser I've been AFK for a bit...hopefully will be getting more reliable internet access soon. I've been thinking it over and I think I can produce a variation of this branch where we have the old setup (i.e., you define a struct that contains the Storage), which should address the various concerns you've raised.

MichaReiser commented 1 month ago

No worries. I hope you're having a great time. I don't have a strong preference over either approach. I think both is fine. The only real blocking item right now is that I don't know how to implement Upcast.

nikomatsakis commented 1 month ago

@MichaReiser I retooled it now, take a look. I think you convinced me that the old approach was better. We now have:

nikomatsakis commented 1 month ago

I went ahead and pushed some other commits I had that make things miri-safe again (at least I think they do, let's see what CI has to say about it).