To answer my own question; I performed some tests with the Apache benchmarking tool. I performed 5000 requests over 10 threads to a local server running lighttpd with FastCGI, multiple passes over a few hours, with my middleware disabled for one pass and disabled for another.
The passes were both on par, as I was hoping/expecting they would be. The average difference was something like 2 seconds, with the enabled middleware being the faster one usually. Obviously this means nothing, and they're both on par and there's nothing to worry about. On Aug 18, 1:11 pm, Nathan Hoad <nat...@getoffmalawn.com> wrote: > I have a project at the moment that requires a lot of corporate > branding as well as internationalisation/translations etc. Basically > the way the system currently works is that it performs the > translations, then applies branding for specific distributors. > > Now we're developing a web-based front end using Django, and of course > the same rules still apply. I have a solution at the moment that uses > a very minimalist middleware, which is called after the translations > are performed, using the process_template_response method. > > Of course, it's working all fine, but I'm wondering about the > performance hit from what's essentially 10-20 of str.replace() > methods? The alternative is to create my own wrapper for Django's > translation package, but after looking at the code I'm not big on that > idea. > > If anyone has any alternative solutions, don't hesitate to share! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.