refactor: drop unused contract preloading infrastructure #7042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The preload is the idea that we usually execute a bunch of contracts in
a row, and that we can pipeline the execution a bit:
while the fist contract is execution, we can, on a separate thread, be
preparing context to run the second contract.
We have this implemented in a proof-of-concept state for about a year,
but this has been dead code still. There's some kernel to the idea, but
it doesn't feel like the most impactful thing we can be working on, and,
realistically, this is going to be left untoched for a long time still.
Specific problems:
re-use is likely going to be bigger
are free. If all the cores are busy, preloading is pure overhead
in a single call to
apply
. It's possible to make efficient use ofpreloading, but that requires complicated code outside of
near-vm-runner and, potentially, even runtime.