Optimize output_directories in SandboxREAPI (remote execution / buildbox-run)
SandboxREAPI currently always requests the whole directory tree as output directory. This is not always required and, depending on the server implementation or the buildbox flavor, the overhead may be significant.
If SandboxFlags.ROOT_READ_ONLY
is set, only marked directories need to be captured as the rest of the sandbox is (supposed to be) read-only.