I'm executing docker build command in the pipeline step. Dockerfile has commands to restore, build and publish .csproj's using mcr.microsoft.com/dotnet/sdk:8.0-alpine3.18
After upgrading .NET Core 6 projects to .NET Core 8, it's taking a lot longer to build and publish than before with Bitbucket pipeline.
Here is the time spent on each task with .NET Core 6
dotnet build - 34.3s
dotnet publish - 17.4s
Here is the time spent on each task with .NET Core 8
dotnet build - 342.5s
dotnet publish - 1399.1s
After doubling the memory size (size: 2x) of the entire pipeline step and increasing the docker service memory to 4096, it completed the tasks in less time.
Here is the time spent on each task with .NET Core 8 after doubling the memory
dotnet build - 37.0s
dotnet publish - 20.1s
It would be great if someone could provide a technical explanation of what's happening here. Is this normal behavior with .NET Core 8? Does the .NET Core 8 SDK consume a significant amount of memory?
Hello @bishan.vithanage ,
thank you for reaching out to Community!
The upgrade from .NET Core 6 to .NET Core 8 might have introduced some new features or functionalities that could be more resource-intensive. These new elements could potentially be the reason why your build and publish time has increased with Bitbucket pipeline, and why they were back to the same level after you increased the memory allocation.
.NET Core 8 might have more advanced features that require additional processing time. It's also possible that changes in the way the new version handles certain tasks might be affecting the performance.
If you would like more details on what changes are causing the framework to be more resource-intensive, it might be helpful to reach out to the .NET community or Microsoft support. They might be able to provide more specific guidance based on your particular situation.
Thank you, @bishan.vithanage !
Patrik S
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.