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

Library is very large #1584

Closed
Jamesking56 opened this issue Sep 20, 2024 · 2 comments
Closed

Library is very large #1584

Jamesking56 opened this issue Sep 20, 2024 · 2 comments
Labels
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

@Jamesking56
Copy link

Describe the bug

This Composer library is inordinately large compared to most libraries. Downloaded it is 244.8 MiB.

This causes issues for me since my hosting provider limits Composer to run maximum for 5 minutes. This library is so big that it causes Composer to timeout on my host.

I am only using the library since it is required for using PHP to send emails via Office 365, since SMTP is being phased out.

Is there a better trimmed version of this library that can be made available?

Expected behavior

The library size is closer to most Composer libraries, < 50 MiB.

For comparison, AWS SDK is 48.7 MiB.

How to reproduce

Require this library and look at the size output in vendor.

SDK Version

2.14.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

image

Configuration

  • OS: PopOS 22.04
  • Architecture: x64

Specifically PHP timeout set to 300 seconds

Other information

Looks like the largest file in this repo is src/Generated/kioa-dom-export.txt at 35.7 MiB alone, do we need this file?

@Ndiritu
Copy link
Contributor

Ndiritu commented Sep 30, 2024

Thank you for reporting this @Jamesking56 and for pointing out the large size of the kiota-dom-export file

We acknowledge this challenge and provide two workarounds at the moment:

  • Using microsoft-graph-core which provides a Guzzle HTTP client pre-configured with middleware to call Microsoft Graph. Setup & samples

  • This SDK is generated based off Microsoft Graph's OpenAPI description using a tool we maintain called Kiota. You can run Kiota CLI & generate an SDK for only the Mail endpoints and add this to your CI pipelines to get regular updates:

kiota generate -l PHP -d https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/refs/heads/master/openapi/v1.0/openapi.yaml --include-path **/messages/** --include-path **/mailFolders/**  -c GraphMailClient -n Microsoft\Graph\Mail\Client -o ./client

For a guide on this, please refer to https://learn.microsoft.com/en-us/openapi/kiota/quickstarts/php.

@Ndiritu Ndiritu added type:question An issue that's a question status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Sep 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
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