Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing "github.com/microsoftgraph/msgraph-sdk-go" adds 10 seconds to build time #753

Closed
quinn opened this issue Jul 30, 2024 · 2 comments
Labels
Status no recent activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question

Comments

@quinn
Copy link

quinn commented Jul 30, 2024

Describe the bug

Adding this package took my build time from around 1 second to 10 to 20 seconds.

Expected behavior

I would expect adding a new dependency to only make a marginal difference on build time.

Is there a way to only include the graph libraries that I will be using?

How to reproduce

main.go:

package main

import (
	"fmt"

	msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
)

type Repo struct {
	msgraph *msgraphsdk.GraphServiceClient
}

func main() {
	fmt.Println("%v", Repo{})
}
$ go mod init test
$ go mod tidy
$ time go build main.go
go build main.go  6.78s user 3.18s system 55% cpu 18.043 total

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@quinn quinn added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 30, 2024
@baywet
Copy link
Member

baywet commented Jul 30, 2024

Hi @quinn,
Thank you for using the sdk and for reaching out.
We just had a very similar question a couple of days ago so I thought I would link you to the answer I provided back then.
microsoftgraph/msgraph-sdk-java#2098 (comment)
Let us know if you have any additional question.

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 30, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status no recent activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question
Projects
None yet
Development

No branches or pull requests

2 participants