idna icon indicating copy to clipboard operation
idna copied to clipboard

Regression in import time

Open Dreamsorcerer opened this issue 5 months ago • 2 comments

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?

Dreamsorcerer avatar Sep 12 '24 22:09 Dreamsorcerer