Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Compressing the discovery cache

オープン
#2,321 コメント 8 件 リアクション 9 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

まず、v2.114.0 のキャッシュサイズをベースラインとして、discovery cache の documents ディレクトリを作成および読み取るコードを特定します。Python 標準ライブラリで利用できる圧縮アプローチを比較し、キャッシュが Docker イメージにどのようにパッケージ化されているかを確認します。キャッシュが大幅に小さくなり、ライブラリから引き続き利用可能で、build または deploy のサイズが改善されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

priority: p3 type: feature request

#2315 shaved off a bit more than 20MB of the discovery cache, by removing the json indentation.
Currently there's still 74.6MB remaining, and it appears to be growing steadily over time (from 81MB on 2023-03-31 to 94MB on 2024-01-15).

So while #2315 definitely helped, I believe that it's a good idea to consider reducing the size even further. I believe that this could significantly improve build/deploy times of the many docker images that use this library. For reference, the current latest python-slim docker image is less than 50MB.

An easy win would be to use compression.
To illustrate: if I manually zip the entire documents directory of 74.6MB in v2.114.0 using the pop-os default gnome archive manager, I end up with an archive of 11.9MB.
Creating a documents.tar.xz in the same way makes this 4.6MB.

It should be possible to achieve similar levels of compression by using Python's standard compression libraries, e.g. zlib, zipfile, or lzma.

主要言語
Python
スター
8.9k
フォーク
2.6k
平均マージ
2日 1時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleapis/google-api-python-client のほかの issue

googleapis/google-api-python-client の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。