# Improving dataclasses startup performance

**URL:** <https://discuss.python.org/t/improving-dataclasses-startup-performance/15442>\
**Category:** Committers\
**Created:** [May 2, 2022, 11:16pm UTC](https://discuss.python.org/t/improving-dataclasses-startup-performance/15442 "2022-05-02T23:16:56Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![guido](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guido/32/21_2.png) [@guido](https://discuss.python.org/u/guido)\
**Post date:** [May 10, 2022, 1:59pm UTC](https://discuss.python.org/t/improving-dataclasses-startup-performance/15442/18 "2022-05-10T13:59:40Z")

</div>

An observation, from Mark Shannon: starting the compiler is slow, so exec() has a high fixed overhead. We could combine all the exec() calls together (per class) and get some of that overhead back.

—Guido

---

_[View the full topic](https://discuss.python.org/t/improving-dataclasses-startup-performance/15442)._
