[Zope] Options for handling concurrency?

Tony McDonald tony.mcdonald@ncl.ac.uk
Tue, 29 Feb 2000 14:32:29 +0000


At 8:19 am -0500 29/2/00, Martijn Pieters wrote:
>It shows you reference counts, and how they change over time. Reference
>counts are how many references there are to classes and methods. This
>generally lets you see how many instances there are of those classes. It
>allows you to see where the hotspots might be.
>

Thanks for the insights Martijn, I'll use the manage_debug with care...

>  >
>>  As an aside (to the list), looking around the ApplicationManager.py
>>  reveals something called manage_profile. It looks like the main Zope
>>  functions are being profiled here (ie not at the object level). It's
>>  interesting, but it does seem to be a resource hog...
>
>But so is something in your app.

I know :(

>You might want to run it and see what
>analysis you get. For more documentation of the data the profiler
>returns, see:
>
>   http://www.python.org/doc/lib/profile.html

Again, thanks for the pointer - I'll look into that.

>This only shows that MySQL is multithreaded, not that the DA is. Run the
>expensive, 9 second query in a ZSQL Method. Then try and access another
>ZSQL Method on the same Zope server. If it is multithreaded, you should
>get results about as fast as when the heavy one isn't running. If it is
>the old MySQL DA, you'll have to wait until the 9 sec query is finished.

Yup. I've checked it out. That's exactly what's happening, ie the 9 
second query doesn't seem to be slowing the other queries down at all.

>  > I do use caching Martijn, but I must admit that it's been a hit and
>>  miss affair. I'm trying to do as many of my SQL queries in external
>>  methods (ironically for the performance), so I may well be losing a
>>  lot of the caching performance breakthrough there .... hmmm. I wonder
>>  if I could do something like...
>
>This shouldn't make any difference. Only in doing excessive loops in
>loops and the like, would an External Method be any use.
>

I do have to do nested loops, and as I've written in another email, 
I've got most of it working in an External Method now. The 
performance increase is pretty impressive (9-10 times faster than a 
ZODB solution), but I know I'm missing the ZODB magic...

Many thanks for the thoughts Martijn...
cheers
tone.
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2