This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients danishprakash, paul.moore, pmpp, steve.dower, tim.golden, zach.ware
Date 2018-12-08.22:17:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544307436.72.0.788709270274.issue35292@psf.upfronthosting.co.za>
In-reply-to
Content
(Sorry, page submitted while I was still typing for some reason.)

... Instrumentation for everything other than time is unaffected, so if you didn't mean to conflate them, then no there is no impact on the documented use.

Yes, moving mimetypes.init to the first request will make the first request slower. However, it makes *import* faster, and there should not be a significant penalty just for importing this module.

You can trivially front-load the work in your app by calling mimetypes.init yourself, which will reduce the overhead on first request to a dict copy (I assume, haven't looked at the PR yet). Or just don't measure the first request - it's typical to do some warm-up loops when profiling.
History
Date User Action Args
2018-12-08 22:17:16steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, pmpp, zach.ware, danishprakash
2018-12-08 22:17:16steve.dowersetmessageid: <1544307436.72.0.788709270274.issue35292@psf.upfronthosting.co.za>
2018-12-08 22:17:16steve.dowerlinkissue35292 messages
2018-12-08 22:17:16steve.dowercreate