#Slow stdout execution

1 messages · Page 1 of 1 (latest)

tall jewel
#

Hi,
I'm trying to understand why retrieving the output of a function call is very slow.
I understand that file copies in and out of container takes time as requiring a full sync, but in this use case, I am just outputting a small json structure, and the stdout call takes 30 sec (half of the full execution time)
I'm wondering what's consuming this time, and if there's a way / workaround to speed it up ?
Here is a trace : https://v3.dagger.cloud/mikael-bc/traces/b42be4c4a607f11f4069744d030a3ba0?listen=8c33f0598ac11f62&listen=4823552840a3b111

Any help appreciated 🙂

timber zephyr
stoic sky
timber zephyr
#

@tall jewel if you run the same pipeline again but with a slightly change in the dotnot-gitversion with-exec. Does it still take that much time?

tall jewel
timber zephyr
tall jewel
#

Thinking, it's probably obvious, but if all I need from a function execution is the output inside a container, i'd much better call the stdout() in the function than in the command line right ? That way, the container created in the function doesn't need to be downloaded on the host ?
eg
//in module
return dag.container()(...).stdout()
//in shell
dagger call my_function

rather than
//in module
return dag.container()(...)
//in shell
dagger call my_function stdout