|
|
Subscribe / Log in / New account

Lazy imports for Python

Lazy imports for Python

Posted Sep 9, 2022 10:28 UTC (Fri) by georgm (subscriber, #19574)
Parent article: Lazy imports for Python

# time firewall-cmd --state
running

real	0m1.675s
user	0m0.861s
sys	0m0.105s
for a simple DBUS call...

Hopefully this will benefit from such a change


to post comments

Lazy imports for Python

Posted Sep 9, 2022 19:12 UTC (Fri) by smurf (subscriber, #17840) [Link] (1 responses)

Mmh. I'd assume that half that time is spent waiting for the introspection XML, and much of the other half might well be loading etree and decoding the thing.

DBus is nice, but its metadata system could have used a somewhat simpler data model.

Lazy imports for Python

Posted Sep 9, 2022 19:14 UTC (Fri) by smurf (subscriber, #17840) [Link]

Forgot to add: I just traced two dbus command line tools I'm using around here. They have comparable startup times (that is, way too long), but the number of modules they load without actually needing them is negligible.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds