Slow export performance, more severe inside docker

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, python
領域
performance

調査の方向性

レポートにはリポジトリのファイルやテストが記載されていません。まず、ローカルと提供された Docker ビルドで poetry export --without-hashes を再現し、その後、エクスポートプラグインの実行経路を調査して遅延箇所を特定してください。エクスポートの実行時間または動作に対するリグレッションチェックを行い、パフォーマンス差を特定して対処できれば完了です。

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

説明

Hi,

I am seeing very slow poetry export performance inside docker.
I've used the poetry sources as reference.

poetry git:(master) ✗ git clone https://github.com/python-poetry/poetry.git

poetry git:(master) ✗ time poetry export --without-hashes
(snipped)
poetry export --without-hashes 1.69s user 0.15s system 86% cpu 2.129 total

➜ poetry git:(master) ✗ cat Dockerfile

# syntax = docker/dockerfile:1.2
#
# Build stage
#

FROM python:3.10 AS builder
WORKDIR /app

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python - -y
ENV PATH="/root/.local/bin:$PATH"

COPY pyproject.toml .
COPY poetry.lock .

RUN poetry export -f requirements.txt --without-hashes

➜ poetry git:(master) ✗ time docker build . --no-cache
[+] Building 38.2s (14/14) FINISHED
(snipped)
=> [3/6] RUN curl -sSL https://install.python-poetry.org | python - -y 19.2s
(snipped)
=> [6/6] RUN poetry export -f requirements.txt --without-hashes 15.4s

With my private reference which I cannot share, I've seen local invocations taking 10-15 seconds and in-docker invocations taking up to 90 seconds for what should ostensibly be a direct translation from one file format to another.

主要言語
Python
スター
336
フォーク
59
平均マージ
10分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

python-poetry/poetry-plugin-export のほかの issue

python-poetry/poetry-plugin-export の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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