Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Matt Andrews
mplate tags are taking some time. Is the page >> huge? Are you doing a ton of formatting? Is there something you could maybe >> move to server-side? >> >> Also, this might help with caching bits of your output: >> >> >> On Thu, Apr 18, 2013 at 6:17 AM, Matt Andr

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Matt Andrews
On Thursday, 18 April 2013 10:45:40 UTC+1, Tom Evans wrote: > On Wed, Apr 17, 2013 at 11:18 PM, Matt Andrews > <ma...@mattandrews.info> > wrote: > > Hi all. > > > > Having performance problems with my Django app. I've posted here before > > talking

Help interpreting profiler results (or: why is my app so slow?)

2013-04-17 Thread Matt Andrews
Hi all. Having performance problems with my Django app. I've posted here before talking about this: one theory for my slowness woes was that I'm using raw SQL for everything after getting sick of Django doing things weirdly (duplicating queries, adding bizarre things like "LIMIT 3453453" to

Re: Using template fragment caching *inside* a sitewide cache: possible?

2013-02-15 Thread Matt Andrews
the results here: http://www.scenepointblank.com/ (it's the "popular right now" tabbed widget near the bottom right. On Thursday, 14 February 2013 17:19:28 UTC, Matt Andrews wrote: > > Hi Tom, > > Yep, you've got the problem right. Reading it back that way I see the >

Re: Using template fragment caching *inside* a sitewide cache: possible?

2013-02-14 Thread Matt Andrews
:42 PM, Matt Andrews > <ma...@mattandrews.info> > wrote: > > Hi all, > > > > I've been experimenting with an expensive query I need to call > (essentially > > grabbing data from some Google APIs). I tried this experiment: > > > > A sitewide cach

Re: Using template fragment caching *inside* a sitewide cache: possible?

2013-02-14 Thread Matt Andrews
Apologies for bumping this thread, but is there anybody with any insight on this? Really driving me crazy! On Monday, 11 February 2013 13:42:05 UTC, Matt Andrews wrote: > > Hi all, > > I've been experimenting with an expensive query I need to call > (essentially grabbing data f

Using template fragment caching *inside* a sitewide cache: possible?

2013-02-11 Thread Matt Andrews
Hi all, I've been experimenting with an expensive query I need to call (essentially grabbing data from some Google APIs). I tried this experiment: - A sitewide cache with a long (days) expiry time - A template fragment with its own separate cache *inside* a view cached by the sitewide

Busting template fragment caches inside a sitewide cache: possible?

2013-02-10 Thread Matt Andrews
Hi all. I have a site which makes use of Google's Analytics API which allows me to grab the most-viewed content on my site and then show it in various ways around the site ("most popular articles" etc). The query against this API is slow (takes a couple of seconds) so I've been caching it as

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Matt Andrews
e > (iow a page might take 1s to load with the toolbar, but the toolbar will > report 500ms, which is accurate for load-time *without* the toolbar). > > _Nik > > On 1/22/2013 9:26 AM, Matt Andrews wrote: > > Hi Nik, > > I see the discrepancy both locally and whe

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Matt Andrews
uery, > and executing the query as part of a Django request… especially with such a > basic query. Do you see the same difference in timing locally or is it only > when deployed? > > _Nik > > On Jan 22, 2013, at 4:47 AM, Matt Andrews > <ma...@mattandrews.info> > wr

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Matt Andrews
gt; > > [1] > < > https://docs.djangoproject.com/en/1.4/ref/models/querysets/#prefetch-related> > > > > 22.1.2013 13:57, Matt Andrews kirjoitti: > > Hi Jani, > > > > I made a StackOverflow post last year with an example of the ORM stuff I > > tried and the poor

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Matt Andrews
what you had when things were slow? > > 22.1.2013 12:26, Matt Andrews kirjoitti: > > Hi Nik, > > > > Thanks - I do feel like by circumventing the ORM I've just "given up" > > and perhaps I'll reconsider -- none of my queries are particularly > > "special

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Matt Andrews
esh the page do the queries run just as > slow the second time around? and 2) are your Django app and phpMyAdmin > running on the same machine? If not, could transit time be an issue? > > Finally, can you give an idea about the size of the tables in question? > How many rows in each? &g

Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-21 Thread Matt Andrews
Hi all, Fairly new to Django. I ended up pulling out all of the ORM-generated queries and writing my own SQL directly (I got fed up trying to work out how to achieve the kind of things I needed without Django adding in extra joins or unintended WHERE clauses etc). All my app's SQL uses