[New-bugs-announce] [issue44582] Accelerate mimetypes.init on Windows

Steve Dower report at bugs.python.org
Wed Jul 7 16:06:39 EDT 2021


New submission from Steve Dower <steve.dower at python.org>:

mimetypes.init is slow on Windows because of the big registry search, which involves touching thousands of entries in order to add a few hundred into the initial table.

Things get even worse when audit hooks are enabled, because the winreg methods need to be hooked. However, we know that this particular operation is coming from core, and so we could skip these hooks.

Both issues can be trivially solved (helped) with a native accelerator function.

----------
assignee: steve.dower
messages: 397110
nosy: steve.dower
priority: normal
severity: normal
status: open
title: Accelerate mimetypes.init on Windows
type: performance
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44582>
_______________________________________


More information about the New-bugs-announce mailing list