python-poetry / python-poetry/poetry-plugin-export

Slow export performance, more severe inside docker

Open
#98 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
57
Avg merge
1h 23m
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no repository files or tests. Start by reproducing poetry export --without-hashes locally and in the supplied Docker build, then inspect the export plugin's execution path to locate the slowdown. Done means identifying and addressing the performance difference with a regression check for export timing or behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.