#21080: collectstatic post-processing fails for references inside comments
-------------------------------------+-------------------------------------
     Reporter:  shreyas@…            |                    Owner:  Tomáš
                                     |  Zigo
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.staticfiles  |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 I made a very quick and dirty experiment inside
 `HashedFilesMixin._post_process` using the `pyparsing` capability to
 remove comments from files (`pyparsing.cpp_style_comment.suppress()`).
 Running the Django staticfiles tests with or without that comments removal
 showed a performance penalty of ~330% (8.6 secs instead of 2.6 secs). A
 first optimization to only strip comments when an error occurs reduces the
 penalty to ~170% (strongly dependent on files at hand, of course).

 It is expected that using a parser instead of regexes will affect
 performance more or less badly. What performance penalty are we ready to
 pay for fixing this?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21080#comment:25>
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/0107018664f68a80-6f6f1fc1-17cb-4808-8376-7e5c690dfe85-000000%40eu-central-1.amazonses.com.

Reply via email to