ManimCommunity / ManimCommunity/manim
Reduce the time for CLI startup
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
Description of the proposed feature
Currently, when running manim executable or module using (py -m manim), the whole module is imported which is large and takes a lot of time. I propose to move all the CLI handling stuff (ie manim.cli) to a new module called manim_cli which would not import manim until the command line arguments are parsed. By doing so, we can reduce the startup time.
How can the new feature be used?
Reduce the time to load manim command. If someone just wanted to see the help this would reduce the time they wait because manim wouldn't be imported in that case.
Additional comments
We would need to move the main module to src structure for this to work.
src \
- manim
- manim_cli
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the current manim executable and module entry points, especially manim.cli, and measure the existing startup time. Review how the package is laid out under src and determine how a separate manim_cli module could parse arguments before importing manim. Done means the CLI starts faster, including help output, while existing command behavior remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100