# About .exe wrappers created by frontends when installing wheels on Windows?

**URL:** <https://discuss.python.org/t/about-exe-wrappers-created-by-frontends-when-installing-wheels-on-windows/75942>\
**Category:** Packaging\
**Tags:** Windows\
**Created:** [January 2, 2025, 2:17pm UTC](https://discuss.python.org/t/about-exe-wrappers-created-by-frontends-when-installing-wheels-on-windows/75942 "2025-01-02T14:17:15Z")\
**Posts on this page:** 1\
**Showing post:** 35

<div class="post-metadata">

**Author:** ![steve.dower](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steve.dower/32/56_2.png) [@steve.dower](https://discuss.python.org/u/steve.dower)\
**Post date:** [January 6, 2025, 8:02pm UTC](https://discuss.python.org/t/about-exe-wrappers-created-by-frontends-when-installing-wheels-on-windows/75942/35 "2025-01-06T20:02:19Z")

</div>

By my reading of that output (thanks for including it all), the ones that jump out to me as “huh?” are:

- most of `-m` (`runpy`) is actually `import contextlib`
- most of `import json` is actually `import re`
- most of `import dataclasses` is actually `import inspect`
- most of `import tempfile` is actually `import shutil`
- most of `import shutil` is actually importing all the compression algorithms

Just from the names, these all seem like things that we could improve in the stdlib (probably by making them lazy), and significantly reduce startup time for a lot of applications. It would be meaningless if the modules were highly related, but these don’t look like that - e.g. it seems entirely feasible to use dataclasses without also using `inspect` for some other reason, so it’s probably only being imported for a dataclass.

Apart from just names, I’m also looking at cases where the second column is large but the first column is small. That indicates that the module is taking a lot of time because of what it imports, and not because it itself has a lot going on. Most of black’s own modules and dependencies are pretty evenly distributed, even though they take a lot of time - the ones I listed above are spending drastically more time in transitive imports than in their own code.

To bring things back on topic (suggest someone start a new thread if they’re interested in optimising our own imports), the cost of launching the Python application is definitely going to be higher than a fully native application, regardless of AV.

---

_[View the full topic](https://discuss.python.org/t/about-exe-wrappers-created-by-frontends-when-installing-wheels-on-windows/75942)._
