Forums

flask performance support

Is it possible to get a flask app faster by customizing the wsgi file?

It depends what you mean - what sort of performance problems are you having? Long page load times? Generally there are probably ways to optimise your code, but I doubt there's some general "go faster" tweak which isn't application specific, if that's what you're after.

@Cartroo is right. Performance tuning starts with working out where your bottlenecks are. Drop some timing code into your flask app to work out where your time is going and optimise those bits first.

Since you're using Flask, there's a relatively stable WSGI profiler available, if you're familiar with the Python profilers. Note that you'll want to use a stream other than stderr, as I doubt you have access to that - this page might help.

[edit by admin: dead link removal]

Ok, thanks!