[Zope-dev] Does 'undo' scan the entire ZODB?

2002-05-02 Thread Ivo van der Wijk

Hi All,

I just noticed that the undo tab on our zopeserver takes ages to load.
If I try to trace the zope proces (as far as possible), it looks asif
the entire Data.fs is scanned.

Does zope scan the entire ZODB for old versions? It slows down our server
enourmously with a 3G Data.fs. If so, aren't there more efficient ways
to do this (backreferences to old versions for example)

Ivo

-- 
Drs. I.R. van der Wijk  -=-  
Brouwersgracht 132 Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL   -=-  
T +31-20-4688336 F +31-20-4688337Linux/Web/Zope/SQL/MMBase   
W http://www.amaze.nlE [EMAIL PROTECTED] Network Solutions
W http://vanderwijk.info E [EMAIL PROTECTED] Consultancy  
PGP http://vanderwijk.info/pgp  -=-  


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Does 'undo' scan the entire ZODB?

2002-05-02 Thread Toby Dickenson

On Thu, 2 May 2002 12:32:33 +0200, Ivo van der Wijk [EMAIL PROTECTED]
wrote:

I just noticed that the undo tab on our zopeserver takes ages to load.
If I try to trace the zope proces (as far as possible), it looks asif
the entire Data.fs is scanned.

It scans back as far as it needs to find enough transactions to fill
one page. By default that is 20.

However, it only shows transactions which were for request URLs below
the URL of the undo page you are viewing. If you are looking at the
undo for the root, it probably only has to scan back 20 transactions
and all of them are eligible to be shown on the page. However if you
are looking at the undo tab of an insignificant leaf object that
rarely changes, it might have to scan through a very large number of
transactions before it finds 20 relevant ones to show.

Does zope scan the entire ZODB for old versions? It slows down our server
enourmously with a 3G Data.fs. If so, aren't there more efficient ways
to do this (backreferences to old versions for example)

It is already using the optimisation you describe.

The problem is that the decision on whether or not it should show any
given transaction is dependant on the transaction URL, not the oid.
The best it can do is an O(n) scan through the backreferences.



Toby Dickenson
[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Does 'undo' scan the entire ZODB?

2002-05-02 Thread R. David Murray

On Thu, 2 May 2002, Toby Dickenson wrote:
 and all of them are eligible to be shown on the page. However if you
 are looking at the undo tab of an insignificant leaf object that
 rarely changes, it might have to scan through a very large number of
 transactions before it finds 20 relevant ones to show.

Which means if the object only has a couple transactions it will scan
the entire DB

--RDM



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )