Content-Length: 286500 | pFad | https://github.com/python/cpython/issues/126156

96 `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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/126156

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy