#36520: Performance Regression in parse_header_params
---------------------------------+------------------------------------
     Reporter:  David Smith      |                    Owner:  (none)
         Type:  Bug              |                   Status:  new
    Component:  HTTP handling    |                  Version:  dev
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Comment (by Natalia Bidart):

 Following up on your interest, Jake, here are the comparisons using the
 linked implementations. All ratios are calculated against the base
 `cgi`-copied implementation currently in Django 5.2.x (and real `cgi` in
 3.11 and 3.12). The next step, which I'd like to know if you're interested
 in, is to verify whether the comparisons with Requests and Werkzeug are
 fair and whether these implementations can be considered both robust and
 accurate.


 ||=          Python 3.14           =||=  `cgi`  =||=  `requests`  =||=
 `werkzeug`  =||= `get_params(str)` =||= `get_params(bytes)` =||
 || `          text/plain          ` ||   0.257   || 0.114 🚀 -2.3x ||
 0.717 🐢 2.8x  ||    1.664 🐢 6.5x    ||     1.690 🐢 6.6x     ||
 || `text/html; charset=UTF-8; b...` ||   1.033   || 0.494 🚀 -2.1x ||
 1.538 🐢 1.5x  ||    3.693 🐢 3.6x    ||     3.907 🐢 3.8x     ||
 || `application/x-stuff; title*...` ||   3.866   || 0.695 🚀 -5.6x ||
 1.982 🚀 -2.0x ||    8.487 🐢 2.2x    ||    2.152 🚀 -1.8x     ||

 ||=          Python 3.13           =||=  `cgi`  =||=  `requests`  =||=
 `werkzeug`  =||= `get_params(str)` =||= `get_params(bytes)` =||
 || `          text/plain          ` ||   0.308   || 0.134 🚀 -2.3x ||
 0.764 🐢 2.5x  ||    1.661 🐢 5.4x    ||     1.689 🐢 5.5x     ||
 || `text/html; charset=UTF-8; b...` ||   1.135   || 0.527 🚀 -2.2x ||
 1.617 🐢 1.4x  ||    3.769 🐢 3.3x    ||     3.980 🐢 3.5x     ||
 || `application/x-stuff; title*...` ||   4.224   || 0.721 🚀 -5.9x ||
 2.069 🚀 -2.0x ||    9.363 🐢 2.2x    ||    2.164 🚀 -2.0x     ||

 ||=          Python 3.12           =||=  `cgi`  =||=  `requests`  =||=
 `werkzeug`  =||= `get_params(str)` =||= `get_params(bytes)` =||
 || `          text/plain          ` ||   0.329   || 0.136 🚀 -2.4x ||
 0.756 🐢 2.3x  ||    1.683 🐢 5.1x    ||     1.816 🐢 5.5x     ||
 || `text/html; charset=UTF-8; b...` ||   1.441   || 0.623 🚀 -2.3x ||
 1.718 🐢 1.2x  ||    4.599 🐢 3.2x    ||     4.709 🐢 3.3x     ||
 || `application/x-stuff; title*...` ||   1.997   || 0.827 🚀 -2.4x ||
 2.199 🐢 1.1x  ||    9.565 🐢 4.8x    ||     2.521 🐢 1.3x     ||

 ||=          Python 3.11           =||=  `cgi`  =||=  `requests`  =||=
 `werkzeug`  =||= `get_params(str)` =||= `get_params(bytes)` =||
 || `          text/plain          ` ||   0.322   || 0.123 🚀 -2.6x ||
 0.696 🐢 2.2x  ||    1.671 🐢 5.2x    ||     1.667 🐢 5.2x     ||
 || `text/html; charset=UTF-8; b...` ||   1.360   || 0.573 🚀 -2.4x ||
 1.604 🐢 1.2x  ||    4.337 🐢 3.2x    ||     4.498 🐢 3.3x     ||
 || `application/x-stuff; title*...` ||   1.868   || 0.757 🚀 -2.5x ||
 2.106 🐢 1.1x  ||    8.624 🐢 4.6x    ||     2.472 🐢 1.3x     ||
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36520#comment:15>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701988b1fa1d1-026fce6b-0562-4ccc-bd2b-2bf97f5d08f9-000000%40eu-central-1.amazonses.com.

Reply via email to