Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Cache and share the base Wasm#387

Merged
jplevyak merged 5 commits intoenvoyproxy:masterfrom
jplevyak:base-wasm
Jan 31, 2020
Merged

Cache and share the base Wasm#387
jplevyak merged 5 commits intoenvoyproxy:masterfrom
jplevyak:base-wasm

Conversation

@jplevyak
Copy link
Contributor

Cache and share the base Wasm. Use the new definition of Wasm Key to find the base Wasm and thread local Wasm.

find the base Wasm and thread local Wasm.

Signed-off-by: John Plevyak <jplevyak@gmail.com>
Signed-off-by: John Plevyak <jplevyak@gmail.com>
@jplevyak jplevyak requested a review from PiotrSikora January 31, 2020 17:58
@jplevyak jplevyak requested a review from lizan as a code owner January 31, 2020 17:58
}
}
}
// Drop the lock so that the the expensive Wasm creation is not under the lock.
Copy link
Contributor

Choose a reason for hiding this comment

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

But then, we will pay the price for creating many expensive Wasm VMs at the same time, and discarding those that lost the race anyway, won't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that this is going to run on the main thread currently there are not going to be any races. So, perhaps it isn't worth dropping the lock. Removed. PTAL

Signed-off-by: John Plevyak <jplevyak@gmail.com>
Signed-off-by: John Plevyak <jplevyak@gmail.com>
@jplevyak jplevyak requested a review from PiotrSikora January 31, 2020 22:15
Signed-off-by: John Plevyak <jplevyak@gmail.com>
@jplevyak jplevyak requested a review from PiotrSikora January 31, 2020 22:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants