Check out django-cache-machine. It uses memcache to cache your ORM qureies
and updates (invalidates) that cache when they change.

On Fri, Jun 1, 2012 at 10:35 AM, Tim Chase
<django.us...@tim.thechases.com>wrote:

> On 06/01/12 09:17, Subhranath Chunder wrote:
> > On Fri, Jun 1, 2012 at 6:57 PM, Tim Chase <
> django.us...@tim.thechases.com>wrote:
> >> 2) I/O
> >> 2a) disk
> >> 2b) network
> >> 2c) memory
> >>
> > Don't think these might be creating much bottleneck in my scenario. But
> > still, nothing like getting to exact figures. Again, how would you
> measure
> > it?
>
> usually in I/O operations-per-second.  Additionally, if you use
> blocking I/O, the request will have to wait until the I/O has
> completed before the request-processing can complete.  If you can
> pipeline your high-latency I/O operations, it can produce large
> gains.  As for actually measuring the operations, it can be as
> simple as noting datetime.datetime.now() before and after the window
> of interest (and possibly passing those into your template for a
> debugging render).  Without measuring, there's no way to know where
> it's slow.
>
> I'm also rashly assuming that you've disabled DEBUG in your settings.
>
> > The focus of the application has been to reduce bottlenecks as much as
> > possible.
> > Zero or one query, extensive use of memcache, async tasks(via celery),
> etc.
> > it's all there in application layer to reduce the bottlenecks.
>
> Without further details about the particular views that are slowing
> things down, it's hard to tell.  Do you have some middleware that's
> performing queries?  Are certain views slower than others?  How are
> you authenticating (against DB tables or LDAP requests to a remote
> server)?
>
> >> There's no single number to measure the complexity
> >
> > Are we sure. The round-trip response time for a request to the server,
> > can't that be used as a single number to measure the complexity?
>
> Well, a view of
>
>  def slowview(request):
>    time.sleep(2000)
>    return render_to_response(...)
>
> is a slow view, but not terribly complex.
>
> -tkc
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to