Description
Hello,
We have recently begun upgrading from hubspot/hubspot-php
to hubspot/api-client
and observed a significant increase in package size - from under 1MB to approximately 30MB. As our deployment environment relies on Lambda zip images, which are capped at a maximum size of 250MB, we are particularly mindful of third-party library footprints.
Our application requires only a limited subset of functionality, specifically models and API endpoints for CRM contact lists, contact properties, owners, and timeline events.
This focus makes the majority of the library’s components unnecessary overhead for us.
In light of this, we would like to propose adding a cleanup script or an option to include only specific components, similar to approaches used by AWS and Google:
- AWS leverages Composer in their implementation: AWS SDK PHP, and previously held discussions on optimizing library size: AWS SDK discussion.
- Google’s approach also uses a selective cleanup mechanism: Google API PHP Client.
We’d appreciate any insights or potential solutions you may have on this matter.
Kind regards,
Sebastian Heise
Principal Engineer @ AskNicely
PS: Maybe stripping all comments out in a production environment. would be enough to significantly reduce the size of the library.