-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
tl;dr we are deploying the SDK to aws lambdas and ran into a scenario where our primary layer became too large, initially we just stripped individual json files from discovery_cache/documents since this is by far the largest culprit (according to ncdu
).
I also noticed that all of these definitions are actually pretty printed json.
I'm suggesting 2 things:
- Ship a utility to select (and delete other) json definitions that the user wants to use in a deployment.
- Minify all json contents (see trivial script below), this reduced the package size (on disk) by approximately 20mb (and probably also improves load times although I did not test for that).
fs.readdirSync('.').forEach(f => {
const data = JSON.parse(fs.readFileSync(f, 'utf8'));
fs.writeFileSync(f, JSON.stringify(data));
console.log('processed', f);
});
Environment details
- OS type and version: irrelevant
- Python version: 3.9
- pip version: 22.2.2
google-api-python-client
version: 2.64.0
Steps to reproduce
- Install package
- 72mb via
ncdu
Code example
n/a
Stack trace
n/a
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
tgbugs, jorenham, adam-sikora and sevdog
Metadata
Metadata
Assignees
Labels
No labels