Message376420
On Windows with current master, the baseline for running anything with 1 import (">>> import sys; len(sys.modules)") is 35 imported modules. Adding "import unittest" increases this to 80. What slightly puzzles me is that running
---
import unittest
import sys
class Tests(unittest.TestCase):
def test_bug(self):
print("len(sys.modules):", len(sys.modules))
if __name__ == "__main__":
unittest.main()
---
increases the number to 90. Perhaps unittest has delayed imports.
The current startup number for IDLE is 162, which can result in a cold startup of several seconds. I am thinking of trying to reduce this by delaying imports of modules that are not immediately used and might never be used.
For tests, I gather that side-effect issues are more important than startup time. |
|
Date |
User |
Action |
Args |
2020-09-05 00:24:03 | terry.reedy | set | recipients:
+ terry.reedy, vstinner, zach.ware, pablogsal, shihai1991 |
2020-09-05 00:24:03 | terry.reedy | set | messageid: <1599265443.84.0.745648554277.issue41718@roundup.psfhosted.org> |
2020-09-05 00:24:03 | terry.reedy | link | issue41718 messages |
2020-09-05 00:24:03 | terry.reedy | create | |
|