Re: manage_pasteObjects() *really* slow

Dieter Maurer <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Andreas Jung wrote at 2006-4-21 09:57 +0200:
> ...
>The follow profile (for 3 folders
>+ 214 subobjects) shows that a lot of time is spend (or should I say wasted)
>in Referenceably._getCopy().

"Referenceable._getCopy" is a tiny wrapper around "CopySupport._getCopy".
Almost all its time is spend in "CopySupport._getCopy".

The only surprising thing is that "CopySupport._getCopy" appears to
be called 6 times while you tell us that 3 folders are copied.
You may use the current "ZopeProfiler" to analyse from where
the other 3 "CopySupport._getCopy" are called.


It is natural that "_getCopy" is expensive as the complete object
is read from the ZODB and thereby copied.

>In addition we see 2.6 million(!) calls to 
>serialize.persisent_id()..that does not make a much sense to me.  Any 
>insights?

"serialize.persistent_id" is used as Python's pickle
"persistent_id" hook. Pickle calls it for any pickled value
to allow the value to be potentially recognized as a persistent object.
Apparently, you copy complex objects with lots of values ;-)


I you really only want to only restructure the site, you can move
rather than copy the objects -- this is *FAR* cheaper.


-- 
Dieter


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.