[Python-Dev] Python startup time (original) (raw)

Ivan Levkivskyi levkivskyi at gmail.com
Thu Jul 20 07:24:32 EDT 2017


I agree the start-up time is important. There is something that is related. ABCMeta is currently implemented in Python. This makes it slow, creation of an ABC is 2x slower than creation of a normal class. However, ABCs are used by many medium and large size projects. Also, both abc and _collections_abc are imported at start-up (in particular importlib uses several ABCs, os also needs them for environments). Finally, all generics in typing module and user-defined generic types are ABCs (to allow interoperability with collections.abc).

My idea is to re-implement ABCMeta (and ingredients it depends on, like WeakSet) in C. I didn't find such proposal on b.p.o., I have two questions:

-- Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170720/a155f7c5/attachment.html>



More information about the Python-Dev mailing list