KEMBAR78
`Morsel.__init__` loops reserved values and could be replaced with a simple dict update · Issue #126156 · python/cpython · GitHub
Skip to content

Morsel.__init__ loops reserved values and could be replaced with a simple dict update  #126156

@bdraco

Description

@bdraco

for key in self._reserved:

Backstory:
aio-libs/aiohttp#9594
Processing cookies is a significant part of the aiohttp request time, and some requesters have to create many Morsel objects because they have a lot of cookies on every request.

There are few places that can be optimized in http.cookies

This one is low hanging fruit

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions