&gt;&quot;<i>I wrapped all imports in a lazy importer that was triggered by the first attribute access.</i>&quot;<p>Well, putting code in the root of your file is generally the problem to such things, I would argue. Granted, I don&#x27;t know about how that is necessary when it comes to &quot;register maps&quot; and &quot;wrapped c++ libraries&quot;. But I&#x27;d imagine you should be encapsulating them away <i>anyways</i> and that would include fixing large startup time by design.