Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Responsiveness of admin site with over 1,700 products
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
bel  
View profile  
 More options Jun 20 2012, 6:32 pm
From: bel <belm...@gmail.com>
Date: Wed, 20 Jun 2012 15:32:21 -0700 (PDT)
Local: Wed, Jun 20 2012 6:32 pm
Subject: Responsiveness of admin site with over 1,700 products

We have a store with over 1,700 products. When navigating to the "Product
-> Products" module in the admin site, we get delays of up to 1.5 minutes.
The client finds this unacceptable. What should be some avenues we should
look at for addressing this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Brown  
View profile  
 More options Jun 20 2012, 7:48 pm
From: Dave Brown <wakeb0a...@gmail.com>
Date: Wed, 20 Jun 2012 19:48:03 -0400
Local: Wed, Jun 20 2012 7:48 pm
Subject: Re: Responsiveness of admin site with over 1,700 products

You need to add more memory to your server, and increase your database
buffer size.
1700 products is nothing - on one of my stores I have 1697 and it loads in
900ms.

Dave

--
Dave Brown
CEO/Founder
Rampframe.com - Action Sports Network

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Brown  
View profile  
 More options Jun 20 2012, 7:49 pm
From: Dave Brown <wakeb0a...@gmail.com>
Date: Wed, 20 Jun 2012 19:49:57 -0400
Local: Wed, Jun 20 2012 7:49 pm
Subject: Re: Responsiveness of admin site with over 1,700 products

Just to give you some more info (sorry to make that last email short) - I
have a psql shared_buffer size of 512mb.
I also use memcached (not sure if admin is cached if you use the 'cache all
pages' middleware for django - but i have 512mb set to that also.
had 2gb total (not a problem) but now run 4gb (i run other stores - much
larger - on this server)

Dave

--
Dave Brown
CEO/Founder
Rampframe.com - Action Sports Network

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Cauley  
View profile  
 More options Jun 20 2012, 8:31 pm
From: Chris Cauley <ch...@lablackey.com>
Date: Wed, 20 Jun 2012 19:31:21 -0500
Local: Wed, Jun 20 2012 8:31 pm
Subject: Re: Responsiveness of admin site with over 1,700 products

Raw id fields. That's the biggest problem with the admin site. Every place
there is a foriegn key to proguct you're executing 1700 queries to populate
the drop down. And they are queries in the templating engine!! The
templating engine is the weakest link in django and you should avoid
putting queries in for loops while in the templating engine. I'm on my cell
now but if you're interested just respond and I'll throw up and example
first thing tomorrow.
On Jun 20, 2012 5:32 PM, "bel" <belm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Brown  
View profile  
 More options Jun 20 2012, 8:37 pm
From: Dave Brown <wakeb0a...@gmail.com>
Date: Wed, 20 Jun 2012 20:37:36 -0400
Local: Wed, Jun 20 2012 8:37 pm
Subject: Re: Responsiveness of admin site with over 1,700 products

Chris,
I think he is talking about the products list - not the product detail page
- but even that for me loads in under 2 seconds.

Dave

--
Dave Brown
CEO/Founder
Rampframe.com - Action Sports Network

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Cauley  
View profile  
 More options Jun 21 2012, 9:59 am
From: Chris Cauley <ch...@lablackey.com>
Date: Thu, 21 Jun 2012 08:59:23 -0500
Local: Thurs, Jun 21 2012 9:59 am
Subject: Re: Responsiveness of admin site with over 1,700 products

Ah, it's in the list_view. I missed that part. A news site my company
maintains has 16.7k news articles and the list_view loads in under a
second. Have you done anything to modify the product admin? Are you somehow
filtering these items? You could try nuking the product list_display. In
the admin.py file of any app that appears after product in INSTALLED_APPS,
try unregistering the product admin, limiting the list_display to the name
only, and then re-registering it.

from dajngo.contrib import admin
from product.models import Product
from product.admin import ProductOptions

admin.site.unregister(Product)

class NewProductOptions(ProductOptions):
    list_display = ('name',)
    list_display_links = ('name',)

admin.site.register(Product,NewProductOptions)

I just tested this on my localserver and (with only 300 products in the
database) the difference in page load between the two is 2 seconds before
and 0.7s after (5 refreshes). I can't see why this would be affected by the
number of products in the database, but it clearly makes a difference.

If this works for you try adding items back into list_display one at a time
and see what one is causing the problem. I believe "price" and "product
subtypes" are the only thing that could be causing a problem.

Good luck,
Chris Cauley


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bel  
View profile  
 More options Jun 21 2012, 6:35 pm
From: bel <belm...@gmail.com>
Date: Thu, 21 Jun 2012 15:35:01 -0700 (PDT)
Local: Thurs, Jun 21 2012 6:35 pm
Subject: Re: Responsiveness of admin site with over 1,700 products

Yes it was the product list. Apparently, the subtype field was what was
causing the majority of the delay (we have configurable products with about
10-20 variations each).

Thanks to chriscauley suggestion, I limited list_display to ('sku', 'name')
and that increased the query time went from 2457ms to 54ms.

Now I want to limit the queryset only to products with subtype
ConfigurableProduct. Would that help since most of my products are
variations? And how would I do this?

Also looking at MySQL optimization. If anyone has any advice there, I'd be
appreciative.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »