tvix-eval: hotspot when emitting warnings
#228
Opened by tazjin at
When emitting warnings (of which there are many in nixpkgs), we spend a lot of time in Chunk::get_span
to look up information about the warning's chunk. This is literally ~30% of all of eval time right now.
There's a few things we can do here, and probably more that I haven't thought of yet:
- retain information needed to resolve the span (chunk pointer & op index), but don't resolve it right away (to avoid context-switching out of what the VM is doing too much); then resolve at the end
- make the toggle for warnings completely toggle the collection of warnings
It seems that optimising spans with
LightSpan
has made this pretty much go away. I've experimented with a toggle to actually enable/disable warnings collection but it had no noticeable impact on eval time anymore. We can consider this done for now.tazjin at 2022-12-16T10·43+00
- tazjin closed this issue at 2022-12-16T10·43+00