idna
idna copied to clipboard
Regression in import time
In aiohttp we have a regression test for the import time of the library. When using idna <=3.6, the test is passing, but with idna 3.7+ the test fails consistently, indicating a significant regression in import time.
Looking at the changes, the only obvious change is the massive amount of data added to idnadata.py (in joining_types). Maybe this could be lazy loaded, e.g. by putting the construction in a function with a @cache
decorator, or by coming up with a more efficient data structure?