Edgewall Software

Changes between Initial Version and Version 2 of Ticket #7894


Ignore:
Timestamp:
Dec 17, 2008, 8:50:41 AM (15 years ago)
Author:
Remy Blank
Comment:

A direct performance comparison could be done between direct serving using the AliasMatch mentioned above, and Graham's suggestion in comment:1, by testing with file names that don't require encoding.

As fixing this would require a backwards-incompatible change, I'd like to be sure that the performance gain is significant.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7894

    • Property Keywords needinfo added
    • Property Milestone 0.12
  • Ticket #7894 – Description

    initial v2  
    22
    33Since apache is able to serve static files more efficiently than trac, it would be nice if the raw-attachments directory could be aliased in the apache config.  This can of course be done with the main trac static css/image files via "trac-admin deploy" and apache Alias.  However unfortunately the files in the attachments directory have filenames which are encoded, so an alias like the following won't work for all files (like ones with spaces or the like):
    4 
     4{{{
    55AliasMatch ^/trac/([a-z0-9_]+)/raw-attachment/(.*) /data/trac/$1/attachments/$2
    6 
     6}}}
    77Since the only way I can see to do this is to have the files on the disk saved without encoding, it would seem to be a bit difficult to implement since we wouldn't want to break files which were already uploaded.  Possibly just new file uploads (or files in newly created trac projects) could be unencoded so that nothing broke for users who upgraded their previous trac environments.  Then for those who have older trac environments and want to use the apache alias, a script could be used to rename the files and remove the uuencoding.