New submission from Steve Dower <steve.do...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue44582>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to