Merged
Conversation
Signed-off-by: Philipp Gillé <[email protected]>
Signed-off-by: Philipp Gillé <[email protected]>
Signed-off-by: Philipp Gillé <[email protected]>
3a5bd7a to
74b989d
Compare
Signed-off-by: Philipp Gillé <[email protected]>
Contributor
|
Hey @yesnault Thanks for approving the pull request :) I've 2 questions:
We are using Venom a lot and that PR is bringing huge improvement |
Collaborator
|
CDS Report build-venom-a#883.0 ✘
|
Member
|
@christophe-dufour we try to make a release this week (need some Acceptance Tests update on our side before) |
Contributor
|
Awesome news. Thx for the update @yesnault |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello 👋 ,
We're running Venom inside of a Docker container in some cases, while mounting the scenario and custom executor files from the host into the container. Depending on the OS and the Docker config, for example when on macOS and having the "new Virtualization framework" enabled, but "VirtioFS" disabled, file operations can be very slow in Docker. Now with Venom we noticed that custom executors are read dozens of times during scenario execution, adding up to a lot of time.
Here's a screenshot of an example problematic Docker configuration on macOS:

But even with both of those options disabled, or both enabled, the file I/O is not great. For example we have a scenario that takes 1m, and 10s of that is spent purely on reading custom executor files!
This PR fixes that.
It introduces an executor file cache, and reads each file only once.
Cc @christophe-dufour
PS: Maybe some other operations in the loop don't need to be repeated as well, but of those, they either don't take long (based on my measurements) and an optimization would have little impact, or the interpolation step (where an optimization would be nice) is a bit more complex to optimize, because for each
registerUserExecutorscall there can be new variable values so the interpolated result can't be cached, if my understanding is correct. And I wanted to keep this PR simple.