Skip to content

Cleaning up unused services to reduce size of HubSpot API library #427

Open
@sebastianheise

Description

@sebastianheise

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions