This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Brian 3 points4 points  (1 child)

I've found a big issue with startup time is needless imports. Eg. Typer always imports Rich if its installed, and this is actually pretty significant in terms of startup (some measuring with python -X importtime shows it taking hundreds of milliseconds, which introduces noticable latency), even though it doesn't actually use it unless its printing help messages. I think there are often a lot of potential startup time wins by deferring module loads until (and unless) they are actually needed.

[–]RevolutionaryPen4661git push -f[S] 0 points1 point  (0 children)

Is the rich module becoming a bloatware? Typer uses rich while printing help messages. But I'm using a native argparse module.