#Dagger is very slow

1 messages · Page 1 of 1 (latest)

muted timber
#

I'm making my first dagger pipeline and am running it locally. All it does is build a docker image from a Docker file for an existing project.

Doing the equivilent docker build . takes about 10s.

Doing it with Dagger however, will take about 2 minutes.
dagger call build --source=..:source. I tried adding a "view" to exclude directories, but it doesn't seem to have much effect.

I also tried setting GOAWAY=1, which seems to bring it closer to 1-1.5 minutes. It seems pretty inconsistent.

Why does it take so much longer? Is there anything I can do to make it fast?

https://dagger.cloud/conor/traces/3eb483f1418ed3c66b59b2be6506e430

#

My best performance has been around 30s-45s if I do:

  • dagger logout
  • GOAWAY=1

Then the only overhead is 15s-30s of this initialize step, and then 10-15s of actually running the job.

sleek kite
#

@muted timber can you please share the structure of your project?

muted timber
#

I have a large monorepo with go and rust packages. At the root is a Dockerfile that will bind-mount the source code and build artifacts from each package.

I have create a sub-directory with a dagger project to just build the Dockerfile (equivilent of docker build -f ../Dockerfile ..)

muted timber
#

is it the time to upload files/context to the local dagger engine? or is it uploading it to the cloud cache?

muted timber
#

is there a way to tell what is getting uploaded / debug the view?

sleek kite
muted timber
#

Thanks I was able to use this simple job

// Build the application container
func (m *Test) Build(source *dagger.Directory) *dagger.Container {
    return dag.Container().From("ubuntu:latest").WithMountedDirectory("/src", source)
}

Then exec into it and see that there was a lot of stuff that still needed to be ignored.

#

The initialize step seems to vary between 10s-30s, even when I haven't changed the dagger module at all. Is there a way to run the module without having to resolve/install/analyze it every time?

sleek kite
#

we detected some issues with this recently end the current update has some improvements on that aspect

shrewd sequoia
muted timber
#

after updating to 0.13.1 it's noticeably faster and more consistent.

#

The combination of updating and me figuring out how to ignore extra stuff I think has this resolved. Thanks!