Hi Richard,
Like you've seen, the _number_ of queries often has a large effect on speed.
Also, try comparing your page load time with and without debug toolbar
enabled. I found that DDT is slow itself :).
Collin
On Monday, January 5, 2015 at 10:19:44 AM UTC-5, Richard Brockie wrote:
>
> Hi
Hi Jani,
That's a correct diagnosis. I knew Django was doing lazy loading, but
didn't fully understand the implications.
In my case I have a filtered and ordered queryset resulting in ~400
records. Upon processing in the template, each was prompting a database
visit 3 times when outputting
1189 queries is quite a large amount, are all of those really needed? I
think some profiling is in order.
On Mon, Jan 5, 2015 at 3:09 AM, Jani Tiainen wrote:
> On Sun, 4 Jan 2015 20:41:58 -0800 (PST)
> Richard Brockie wrote:
>
> > Hello again,
> >
On Sun, 4 Jan 2015 20:41:58 -0800 (PST)
Richard Brockie wrote:
> Hello again,
>
> I'm to the point in my django development that I am beginning to use
> realistic amounts of test data. I'm using postgresql as the database
> server, with PyCharm as my IDE, everything
Another tool that is less robust but easier than django-debug-toolbar to
simply drop into your code is
import django.db.connection as conn
followed by putting
print(conn.queries)
or
print(len(conn.queries))
before and after where you suspect large numbers of repeated queries are
being executed.
To clarify: I'm not a django core dev and by "neglect" I don't mean that
anyone is being neglectful, just focusing efforts elsewhere.
On Sunday, January 4, 2015, Andrew Farrell wrote:
> The django development server is slow by intentional neglect; It isn't
> supposed to
The django development server is slow by intentional neglect; It isn't
supposed to be used in production because the django team does not want to
divide its focus by supporting a full-fledged web server that is
performance-optimized and security-audited. They want to include a
development server
Hello again,
I'm to the point in my django development that I am beginning to use
realistic amounts of test data. I'm using postgresql as the database
server, with PyCharm as my IDE, everything in a virtualenv on an SSD on an
Ivy Bridge Core i7 processor with 16 GB of RAM running Windows 7
8 matches
Mail list logo