googleapis / googleapis/google-api-php-client-services
Split packages for the sake of bandwidth disk space and the environnement
- Lingua principale
- PHP
- Stelle
- 1.3k
- Fork
- 320
- Merge medio
- 2h 32m
- PR unite (30g)
- 193
Descrizione
This package is the biggest composer package I have ever seen: 40Mb => 73Mb real (because a lot of small files)
Just by itself it weights 50% of all my dependencies, and yet I only use it to call 4 api endpoints...

This single package by itself is using more than 20Go on our pipelines artifacts and an easy 1Go of bandwith per month which is insane in term of carbon footprint considered it's a popular package made by such a big company as google. In comparison, https://github.com/fzaninotto/Faker was shutdown by it's author for environmental concerns for much less
I think it's time to be responsible and to split this package into multiple smaller packages that can be independantly installed based on what users need (eg maybe I'll install a combo of Analytics and Youtube, but I don't want to have the 100's of other subfolders that come with this currently)
Related #222
It is possible to use a monorepo with a private packagist as documented there https://blog.packagist.com/installing-composer-packages-from-monorepos/
Or using a different registry than packagist
If this is not ideal because of the need to add the registry to the composer.json (which isn't that hard) or the high asking price of a private packagist (a bigger issue, in which case I'd recommend a free alternative where it automatically creates multiple github projects https://packagist.org/packages/symplify/monorepo-builder)
Then alternatively I'd consider just separating the really big folders into separate packages, in their respective order:
1. Compute
2. ShoppingContent
3. DialogFlow
4. Dfareporting
5. DisplayVideo
6. Apigee
7. Vision
8. Sheets & Documents
9. Youtube
And keep all the rest in one package, this will help alleviate the size of the main package by 25%, which isn't that much but is already 20 real Mb
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando l’attuale struttura dei pacchetti e la issue correlata #222, quindi confronta il monorepo proposto con gli approcci basati su private Packagist o su pacchetti separati. Il lavoro sarà considerato completato quando gli utenti potranno installare solo i gruppi API di cui hanno bisogno e le dimensioni risultanti degli artefatti del pacchetto e della pipeline saranno sensibilmente inferiori.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php
- Ambito
- build-system
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100