fix: execute runbooks even if project framework isn't detected#468
fix: execute runbooks even if project framework isn't detected#468MicaiahReid merged 2 commits intomainfrom
Conversation
|
|
||
| let mut on_disk_runbook_data = None; | ||
| let mut in_memory_runbook_data = None; | ||
| let runbook_input = cmd.runbook_input.clone(); |
There was a problem hiding this comment.
I see that you're cloning this inputs sometimes along this file, shouldn't be better to change the assemble_runbook_execution_futures signature to hold a &Arc<Vec<String>> instead and avoid some of this deep clones with cheap clones or no clones at all?
I think this could save some memory and since the inputs aren't changed on the process I don't see a case where the shared reference can be end up breaking things.
Also following the data, I found that the clone in the line 538 looks redundant - it's already moved into the closure.
There was a problem hiding this comment.
In most cases, runbook_input is a vec of very small strings. It's rarely, if ever large data being shared. For example, if you run surfpool run <runbook> --runbook-input network_id=localnet, the network_id=localnet is the runbook input. Using Arc adds some overhead, without saving much in terms of memory, so I don't think it's worth it.
Also following the data, I found that the clone in the line 538 looks redundant - it's already moved into the closure.
Great find! Will remove!
No description provided.