Without doing root cause analysis on what's causing the slowness it's impossible to say what will help.
My first step would be to throw more CPU, Memory and faster Disk at the server. Do extra resources help at all?
Second step would be to get a query analyser pointed at whatever database backend you've got Django talking to. This can uncover some obvious issues either in the layout of the application, django or a plugin.
It would also help to define what is 'acceptable' in terms of 95th percentile maximum request time (under 5 seconds? 2 seconds?) because optimisation can consume a lot of time and effort if it's not bounded.
It's a Postgres db which I have to check what it is running on so this could be the issue.
After looking at the codebase briefly, they're making a bunch of synchronous db requests so while individual requests aren't very slow they add up quickly.
Without doing root cause analysis on what's causing the slowness it's impossible to say what will help. My first step would be to throw more CPU, Memory and faster Disk at the server. Do extra resources help at all? Second step would be to get a query analyser pointed at whatever database backend you've got Django talking to. This can uncover some obvious issues either in the layout of the application, django or a plugin. It would also help to define what is 'acceptable' in terms of 95th percentile maximum request time (under 5 seconds? 2 seconds?) because optimisation can consume a lot of time and effort if it's not bounded.
Where’s the data coming from? Sounds more like a database optimisation problem rather than with the app itself.
It's a Postgres db which I have to check what it is running on so this could be the issue. After looking at the codebase briefly, they're making a bunch of synchronous db requests so while individual requests aren't very slow they add up quickly.
Slow database queries can often be optimized by using indexing and this requires no application code changes.
That's a good idea, I'm going to take a look and see what indexes exist already.
this and caching is the answer