performance: reduce the number of fills

- Remove unnecessary Fill() in Export()
- Change `set()` and the way we store outputs so we don't fill
  intermediaries as much
- WIP: Scan the tree only once. Changed LocalDirs to use cueflow rather than
  doing our own Walk. In a follow up we should use the same flow
  instance.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-02-19 14:04:40 -08:00
parent d5830fbaca
commit 890fdb4176
6 changed files with 86 additions and 103 deletions

View File

@@ -162,10 +162,7 @@ func (c *Client) outputfn(ctx context.Context, r io.Reader) (*compiler.Value, er
lg := log.Ctx(ctx)
// FIXME: merge this into env output.
out, err := compiler.EmptyStruct()
if err != nil {
return nil, err
}
out := compiler.EmptyStruct()
tr := tar.NewReader(r)
for {