pyinstaller / pyinstaller/pyinstaller

Matplotlib environment variable hook makes app slow

Open
#3,472 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
2k
Avg merge
1d 3h
Merged PRs (30d)
11

Description

pyinstaller has a hook to change the matplotlib config environment variable to a random directory every time the program starts: pyi_rth_mplconfig.py

This hook is a hack to avoid some other problem which I can't quite figure out but it was added in
https://github.com/pyinstaller/pyinstaller/commit/213bfc3923055cfc18ba7248db5124dbfccea3f9

in artisan, we got a bug report about startup slowness:

https://github.com/artisan-roaster-scope/artisan/issues/178

I've tested pyinstaller+artisan without pyi_rth_mplconfig.py and nothing breaks, so I'm not sure if this hack is still needed.

Contributor guide

Open the contributing guide

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

Start by reading pyi_rth_mplconfig.py and the linked commit 213bfc3923055cfc18ba7248db5124dbfccea3f to understand why the environment variable is changed. Review the Artisan issue 178 and compare behavior with and without the hook; done means resolving whether the hook is still needed without reintroducing the reported problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.