#30772: Template Cache "make_template_fragment_key" function speed up & switch 
to
SHA256
--------------------------------------+------------------------------------
     Reporter:  Daniel                |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Cache system)   |                  Version:  2.2
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Daniel):

 Replying to [comment:3 Claude Paroz]:

 > Could you make a version of your patch while keeping MD5?

 Certainly.  The PR now does that, and the comparison test repo gives the
 following output:

 {{{
     Testing: vary_on = None
     Original: 0.304896 (1.0)
     New (MD5): 0.180153 (1.692427 x)
     New (SHA256): 0.187187 (1.628828 x)
     New (Blake2s): 0.108020 (2.822575 x)

     Testing: vary_on = ['Hello World', 'This is some more text', 33]
     Original: 1.488445 (1.0)
     New (MD5): 0.434238 (3.427719 x)
     New (SHA256): 0.439837 (3.384082 x)
     New (Blake2s): 0.312340 (4.765460 x)

     Testing: vary_on = ['Single String']
     Original: 0.736225 (1.0)
     New (MD5): 0.281357 (2.616693 x)
     New (SHA256): 0.282072 (2.610059 x)
     New (Blake2s): 0.177312 (4.152141 x)

     Testing: vary_on = [100, 201740820, 10820804, 12048023864, 1]
     Original: 1.480063 (1.0)
     New (MD5): 0.632621 (2.339574 x)
     New (SHA256): 0.640986 (2.309041 x)
     New (Blake2s): 0.448273 (3.301699 x)

     Testing: vary_on = very long string
     Original: 47.067326 (1.0)
     New (MD5): 1.337903 (35.179913 x)
     New (SHA256): 1.854285 (25.383011 x)
     New (Blake2s): 1.374788 (34.236063 x)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30772#comment:4>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/070.45500c70c3c0f47d4f1a6cb26329f12d%40djangoproject.com.

Reply via email to