From: Dieter Maurer [mailto:dieter@handshake.de] [...] They can be far apart. Although, when your pickle is several MB your object is not several bytes and vice versa.
Well, in that case it might be useful for such a ZODB admin tool to show both sizes. It could be a combined cache analysis and ZODB browsing tool. [...]
I do not yet understand why you would want such a thing. Can you provide use cases?
I guess I want something very low-level, for use in debugging strange behavior, and for help in understanding how Zope apps are built. The ZMI works with object interfaces, which is useful, but requires that each object supports an interface (ObjectManager etc). Many objects don't, especially not when you're developing them :) For this reason--no access to data except through application-provided interfaces--ZODB feels much like a "black box" to me. Example use cases include: - SPACE AND MEMORY OPTIMIZATION. Reducing ZODB size, and Zope memory usage. I've got some huge objects in my database, which ones are they? Why are they huge? If I know this, I can optimize. (Related: My Zope uses a lot of memory; why? Objects of which class, and in which location, uses the most memory? Why were they loaded? At the ZMI level, you don't want to know if objects are loaded/ghosted.) - UNDERSTANDING CONTENT TYPES AND TOOLS. What is the difference in the data structure of PloneDocument and CMFDocument? - DEBUGGING CLASS MIGRATION PROBLEMS. Some older objects are exhibiting strange behavior; what is the difference in data structure between them and the new objects? Which objects of class X doesn't have attribute A set? (Except for the obvious Zope/CMF/Plone/Product upgrades, these kinds of problems happen a lot during development each time a class is changed without recreating its objects.) - VERIFYING AND IMPROVING DATA STORAGE SCHEMAS. Does class X really store the attributes I thought it would? - CHANGING A PROPERTY THAT DOESN'T HAVE A MANAGEMENT INTERFACE. For debugging, testing, or migration purposes, or for just fixing a one-off bug. The truth is, I think this kind of tool will "open my eyes" to what's in the ZODB and take much of the guesswork out of developing with Zope, similar to the eye opening experience a RDBMS admin tool is. I often write scripts to analyze object structure and do simple changes; I wish, however, that there would be an admin environment that provided: - A database browsing / object inspector tool, taking away the need to write scripts for browsing/changing objects in most cases, and encouraging people to analyze and understand the database structure - A query language that would make it even easier to write scripts (+ ZODB index support?) - A place to store one-off scripts so they don't get mixed up with the application Something like this http://www.pgadmin.org/pgadmin3/screenshots.php, but for the ZODB. Regards, -- Bjorn
On Fri, Oct 24, 2003 at 10:52:18AM +0800, Bjorn Stabell wrote:
From: Dieter Maurer [mailto:dieter@handshake.de] [...] They can be far apart. Although, when your pickle is several MB your object is not several bytes and vice versa.
Well, in that case it might be useful for such a ZODB admin tool to show both sizes. It could be a combined cache analysis and ZODB browsing tool.
Except, as people have already said, there is no general way to find out how much memory an arbitrary object is using. It would be really nice if we could find that out, but we simply can't do it.
interfaces--ZODB feels much like a "black box" to me.
That's because it is :-) You don't really want to know about the ZODB level. The objects in it are basically just binary dumps of objects and you can't tell much about them by looking at the binary dump. You want to know about how your zope objects work. Different thing entirely.
Example use cases include: (snip) - UNDERSTANDING CONTENT TYPES AND TOOLS. What is the difference in the data structure of PloneDocument and CMFDocument?
You can learn a lot of such things by installing DocFinderEverywhere. Try it.
- DEBUGGING CLASS MIGRATION PROBLEMS. Some older objects are exhibiting strange behavior; what is the difference in data structure between them and the new objects? Which objects of class X doesn't have attribute A set?
You can find this out interactively with a python prompt. Google for "conversations with zope".
- VERIFYING AND IMPROVING DATA STORAGE SCHEMAS. Does class X really store the attributes I thought it would?
again, you can easily find this out at the prompt.
- CHANGING A PROPERTY THAT DOESN'T HAVE A MANAGEMENT INTERFACE. For debugging, testing, or migration purposes, or for just fixing a one-off bug.
i think you know what I am going to say next :-)
The truth is, I think this kind of tool will "open my eyes" to what's in the ZODB and take much of the guesswork out of developing with Zope, similar to the eye opening experience a RDBMS admin tool is.
funny, that's exactly how I feel about the python prompt. Try it. It's addictive :-) -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's NUNGO-AUSTIN X! (random hero from isometric.spaceninja.com)
Hi List, I'd like to have a monospaced font like Typewriter or Monaco for the bigger input fields in the forms of the Zope interface. Code is easier to read this way -- for me at least ... where would I do this? thnxx -- 'K:)?
On Fri, 2003-10-24 at 13:40, Kai Vermehr wrote:
Hi List,
I'd like to have a monospaced font like Typewriter or Monaco for the bigger input fields in the forms of the Zope interface. Code is easier to read this way -- for me at least ...
where would I do this?
You could use a browser that allows you to apply your own style sheets or you could make changes to manage_page_style.css HTH, Dylan
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area? thanks! -- 'K:) on 24.10.2003 23:01 Uhr, Dylan Reinhardt at zope@dylanreinhardt.com wrote:
On Fri, 2003-10-24 at 13:40, Kai Vermehr wrote:
Hi List,
I'd like to have a monospaced font like Typewriter or Monaco for the bigger input fields in the forms of the Zope interface. Code is easier to read this way -- for me at least ...
where would I do this?
You could use a browser that allows you to apply your own style sheets or you could make changes to manage_page_style.css
HTH,
Dylan
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669 Sent using the Entourage X Test Drive.
I added Matthews style to "manage_page_style.css" <style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style> worked fine though I was mistaken. Instead I wanted the textarea to be in Monaco. (I's the big input area). So I added this to "manage_page_style.css": textarea { font-family: Monaco; font-size: 12px; } and deleted the input style. But Zope for some strange reason Zope does not reflect the latest changes ... the input fields now keep being formatted with "courier new". And the bigger textarea are not shown in Monaco either. I emptied the browsers cache but any changes made to to "manage_page_style.css" don't change anything ... I'm doing this on my local machine ... any idea how to proceed? thanks! -- 'K:)? on 25.10.2003 2:46 Uhr, george donnelly at list@zettai.net wrote:
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml
<--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Sent using the Entourage X Test Drive.
-- Kai Vermehr | eBoy http://www.eboy.com
Kai, This really isn't a Zope issue, it's likely a browser caching issue. You can make sure you're getting the "right" manage_page_style.css by visiting /manage_page_style.css in your browser. Hit shift-reload if necessary. If that does work, try, clearning your browser cache or try a different browser. On Sat, 2003-10-25 at 14:57, Kai Vermehr wrote:
I added Matthews style to "manage_page_style.css"
<style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style>
worked fine though I was mistaken. Instead I wanted the textarea to be in Monaco. (I's the big input area). So I added this to "manage_page_style.css":
textarea { font-family: Monaco; font-size: 12px; }
and deleted the input style.
But Zope for some strange reason Zope does not reflect the latest changes ... the input fields now keep being formatted with "courier new". And the bigger textarea are not shown in Monaco either.
I emptied the browsers cache but any changes made to to "manage_page_style.css" don't change anything ...
I'm doing this on my local machine ... any idea how to proceed?
thanks! -- 'K:)?
on 25.10.2003 2:46 Uhr, george donnelly at list@zettai.net wrote:
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml
<--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Sent using the Entourage X Test Drive.
Other browser do no difference and an empty cache neither. And this is weird: If I open the style sheet via my browser: <http://127.0.0.1:8585/manage_page_style.css> I see the old style sheet. After that I open the same style sheet with a text editor and I see the new one ... browser cache was emptied. same on different browsers. I'm on OS X, might the style sheet be cached anywhere else? 'K:(? on 25.10.2003 22:06 Uhr, Chris McDonough at chrism@zopemafia.com wrote:
Kai,
This really isn't a Zope issue, it's likely a browser caching issue. You can make sure you're getting the "right" manage_page_style.css by visiting /manage_page_style.css in your browser. Hit shift-reload if necessary. If that does work, try, clearning your browser cache or try a different browser.
On Sat, 2003-10-25 at 14:57, Kai Vermehr wrote:
I added Matthews style to "manage_page_style.css"
<style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style>
worked fine though I was mistaken. Instead I wanted the textarea to be in Monaco. (I's the big input area). So I added this to "manage_page_style.css":
textarea { font-family: Monaco; font-size: 12px; }
and deleted the input style.
But Zope for some strange reason Zope does not reflect the latest changes ... the input fields now keep being formatted with "courier new". And the bigger textarea are not shown in Monaco either.
I emptied the browsers cache but any changes made to to "manage_page_style.css" don't change anything ...
I'm doing this on my local machine ... any idea how to proceed?
thanks! -- 'K:)?
on 25.10.2003 2:46 Uhr, george donnelly at list@zettai.net wrote:
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml
<--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Sent using the Entourage X Test Drive.
-- Kai Vermehr | eBoy http://www.eboy.com
You may need to restart Zope for the change to take effect. Have you done that? On Sat, 2003-10-25 at 16:17, Kai Vermehr wrote:
Other browser do no difference and an empty cache neither. And this is weird: If I open the style sheet via my browser:
<http://127.0.0.1:8585/manage_page_style.css>
I see the old style sheet. After that I open the same style sheet with a text editor and I see the new one ...
browser cache was emptied. same on different browsers.
I'm on OS X, might the style sheet be cached anywhere else?
'K:(?
on 25.10.2003 22:06 Uhr, Chris McDonough at chrism@zopemafia.com wrote:
Kai,
This really isn't a Zope issue, it's likely a browser caching issue. You can make sure you're getting the "right" manage_page_style.css by visiting /manage_page_style.css in your browser. Hit shift-reload if necessary. If that does work, try, clearning your browser cache or try a different browser.
On Sat, 2003-10-25 at 14:57, Kai Vermehr wrote:
I added Matthews style to "manage_page_style.css"
<style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style>
worked fine though I was mistaken. Instead I wanted the textarea to be in Monaco. (I's the big input area). So I added this to "manage_page_style.css":
textarea { font-family: Monaco; font-size: 12px; }
and deleted the input style.
But Zope for some strange reason Zope does not reflect the latest changes ... the input fields now keep being formatted with "courier new". And the bigger textarea are not shown in Monaco either.
I emptied the browsers cache but any changes made to to "manage_page_style.css" don't change anything ...
I'm doing this on my local machine ... any idea how to proceed?
thanks! -- 'K:)?
on 25.10.2003 2:46 Uhr, george donnelly at list@zettai.net wrote:
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml
<--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Sent using the Entourage X Test Drive.
this is beauty!! that worked! -- thanks! 'K:) on 25.10.2003 22:55 Uhr, Chris McDonough at chrism@zopemafia.com wrote:
You may need to restart Zope for the change to take effect. Have you done that?
On Sat, 2003-10-25 at 16:17, Kai Vermehr wrote:
Other browser do no difference and an empty cache neither. And this is weird: If I open the style sheet via my browser:
<http://127.0.0.1:8585/manage_page_style.css>
I see the old style sheet. After that I open the same style sheet with a text editor and I see the new one ...
browser cache was emptied. same on different browsers.
I'm on OS X, might the style sheet be cached anywhere else?
'K:(?
on 25.10.2003 22:06 Uhr, Chris McDonough at chrism@zopemafia.com wrote:
Kai,
This really isn't a Zope issue, it's likely a browser caching issue. You can make sure you're getting the "right" manage_page_style.css by visiting /manage_page_style.css in your browser. Hit shift-reload if necessary. If that does work, try, clearning your browser cache or try a different browser.
On Sat, 2003-10-25 at 14:57, Kai Vermehr wrote:
I added Matthews style to "manage_page_style.css"
<style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style>
worked fine though I was mistaken. Instead I wanted the textarea to be in Monaco. (I's the big input area). So I added this to "manage_page_style.css":
textarea { font-family: Monaco; font-size: 12px; }
and deleted the input style.
But Zope for some strange reason Zope does not reflect the latest changes ... the input fields now keep being formatted with "courier new". And the bigger textarea are not shown in Monaco either.
I emptied the browsers cache but any changes made to to "manage_page_style.css" don't change anything ...
I'm doing this on my local machine ... any idea how to proceed?
thanks! -- 'K:)?
on 25.10.2003 2:46 Uhr, george donnelly at list@zettai.net wrote:
[Kai Vermehr wrote (k@eboy.com) on 10/24/03 6:25 PM]
where can I find "manage_page_style.css"? Is this an object I can find inside the Zope manage area?
lib/python/App/dtml/manage_page_style.css.dtml
<--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Sent using the Entourage X Test Drive.
-- Kai Vermehr | eBoy http://www.eboy.com
On Friday, October 24, 2003, at 03:40 PM, Kai Vermehr wrote:
Hi List,
I'd like to have a monospaced font like Typewriter or Monaco for the bigger input fields in the forms of the Zope interface. Code is easier to read this way -- for me at least ...
I use this: <style type="text/css"> input { padding: 0 1em; font-family: "courier new", courier, monospace; font-size: small; } </style> -- -------^.^-- Matthew "Typewriter" Platte
Is it "normal" to find HTTP_~~~~~~~~~~~~~~~ '~~~~~ ~~~~~~~' ? before channel.creation_time and HTTP_~~~~~~~ '~~~~:~~~~~~~~~~~~~~~~:~~~~~~~~~~~~~~~' just before SERVER_NAME ? I've never noticed such "things" before. Is the number of ~ a clue to find out the origin of the error :) (here a copyerror in an import of a zexp file) Thanks
Don't you mean the Z2.log rather than the error log? If so, it's likely that the artifacts you are finding are the result of a virus or worm sending malformed http transactions to your zope. On Sat, 25 Oct 2003, dd wrote:
Is it "normal" to find HTTP_~~~~~~~~~~~~~~~ '~~~~~ ~~~~~~~' ?
before channel.creation_time and HTTP_~~~~~~~ '~~~~:~~~~~~~~~~~~~~~~:~~~~~~~~~~~~~~~' just before SERVER_NAME ?
I've never noticed such "things" before. Is the number of ~ a clue to find out the origin of the error :) (here a copyerror in an import of a zexp file) Thanks
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
It is the error_log indeed ! I'm right now under Winme (not mine) I ask my daughter to do the same operation I was trying to perform on my remote site she obtains the same error than me : ( but her error_log is normal ('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)') my signature are uptodate, I have taken time to perform a full virus analysis before sending this post We are never safe but I'm rather encline to believe that's a WINME problem I couldn't even install Plone on this computer (it makes crash it after few seconds, without touching the logs) Has somebody succeeded to install zope under winme ? I couldn't find one single entry in the collectors of Zope, CMF or Plone to prove the opposite Dennis Allison a écrit:
Don't you mean the Z2.log rather than the error log? If so, it's likely that the artifacts you are finding are the result of a virus or worm sending malformed http transactions to your zope.
On Sat, 25 Oct 2003, dd wrote:
Is it "normal" to find HTTP_~~~~~~~~~~~~~~~ '~~~~~ ~~~~~~~' ?
before channel.creation_time and HTTP_~~~~~~~ '~~~~:~~~~~~~~~~~~~~~~:~~~~~~~~~~~~~~~' just before SERVER_NAME ?
I've never noticed such "things" before. Is the number of ~ a clue to find out the origin of the error :) (here a copyerror in an import of a zexp file) Thanks
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
WinME is the single worst Windows version ever devised. I don't think Zope will run under it at all. jens On Saturday, Oct 25, 2003, at 13:17 US/Eastern, danielle d'avout wrote:
It is the error_log indeed ! I'm right now under Winme (not mine) I ask my daughter to do the same operation I was trying to perform on my remote site she obtains the same error than me : ( but her error_log is normal ('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)')
my signature are uptodate, I have taken time to perform a full virus analysis before sending this post We are never safe but I'm rather encline to believe that's a WINME problem I couldn't even install Plone on this computer (it makes crash it after few seconds, without touching the logs) Has somebody succeeded to install zope under winme ? I couldn't find one single entry in the collectors of Zope, CMF or Plone to prove the opposite
Dennis Allison a écrit:
Don't you mean the Z2.log rather than the error log? If so, it's likely that the artifacts you are finding are the result of a virus or worm sending malformed http transactions to your zope.
On Sat, 25 Oct 2003, dd wrote:
Is it "normal" to find HTTP_~~~~~~~~~~~~~~~ '~~~~~ ~~~~~~~' ?
before channel.creation_time and HTTP_~~~~~~~ '~~~~:~~~~~~~~~~~~~~~~:~~~~~~~~~~~~~~~' just before SERVER_NAME ?
I've never noticed such "things" before. Is the number of ~ a clue to find out the origin of the error :) (here a copyerror in an import of a zexp file) Thanks
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Bjorn Stabell wrote at 2003-10-24 10:52 +0800:
From: Dieter Maurer [mailto:dieter@handshake.de] [...] They can be far apart. Although, when your pickle is several MB your object is not several bytes and vice versa.
Well, in that case it might be useful for such a ZODB admin tool to show both sizes. It could be a combined cache analysis and ZODB browsing tool.
Python does not know how much memory is used by a Python object. Python was designed to hide such implementation details. More importantly, even when it would know the size of a single object, this would be (almost) irrelevant for your purpose. You want to know the size occupied by a complete persistent object (including its non-persistent subobjects but excluding persistent subobjects). The easiest way to get this information would be to extend pickling and accumulate the size during object load. However, Python is far too flexible (it allows C extensions to control pickling of their instances) to get that easily. Lot's of C extensions would have to be modified. Forget about this approach. It might come with Python 3 or Python 4, but it is unlikely. Python is a high level language hiding memory usage; you want precise information about memory usage. I doubt you will find enough arguments and use cases to get this into Python.
[...]
I do not yet understand why you would want such a thing. Can you provide use cases?
I guess I want something very low-level, for use in debugging strange behavior, and for help in understanding how Zope apps are built. The ZMI works with object interfaces, which is useful, but requires that each object supports an interface (ObjectManager etc). Many objects don't, especially not when you're developing them :) For this reason--no access to data except through application-provided interfaces--ZODB feels much like a "black box" to me.
Do you really care about the size of objects in memory? We no longer live in 1980 when memory has been a scarce resource. If you care about more Pythonic aspects (attributes, methods, size of dictionaries, lists, ...), then you can read a "HowTo" about "Debugging Zope" (--> "Zope.org"). You can access each object in the ZODB and use Python's inspection facilities ("--> Python Library Reference") to analyse its attributes and methods and call its methods interactively (to find out about application specific things).
Example use cases include:
- SPACE AND MEMORY OPTIMIZATION. Reducing ZODB size, and Zope memory usage. I've got some huge objects in my database, which ones are they? Why are they huge? If I know this, I can optimize.
I had a similar problem (the ZODB grew far too fast) and I wanted to understand why. I extended Zope's "Undo" information to include the transaction size. This allowed me to see precisely which transactions were larger than expected. I extended the "fsdump" utility to include the (pickle) sizes of the object records contained in a transaction and to restrict the range of dumped transactions. This has been enough to analyse the problem: ZCatalog's Metadata records caused a transaction size to grow from an expected few hundred bytes to about 500 kB. You can use the same approach to analyse ZODB size problems. Note, that I do not care about memory size. Usually, a persistent object uses memory in the same order as its pickle size (there are exceptions, but they can usually be ignored). With a GB RAM costing about 200 USD, we can ignore the differences between memory size and pickle size.
(Related: My Zope uses a lot of memory; why? Objects of which class, and in which location, uses the most memory? Why were they loaded? At the ZMI level, you don't want to know if objects are loaded/ghosted.)
When your Zope uses a lot of memory, then either you have large numbers of large persistent objects in the ZODB caches (see "Control_Panel --> Database Management" about information of your ZODB caches) or you have memory leaks. Large persistent objects are revealed by large transactions (when written). You can use the above mentioned techniques to analyse transaction sizes and pickle sizes. Memory leaks can be spotted via "Control_Panel --> Debug Information --> Reference Counts" or Shane's "LeakFinder" product.
- UNDERSTANDING CONTENT TYPES AND TOOLS. What is the difference in the data structure of PloneDocument and CMFDocument?
Use a debugger, "DocFinder", the sources.
- DEBUGGING CLASS MIGRATION PROBLEMS. Some older objects are exhibiting strange behavior; what is the difference in data structure between them and the new objects? Which objects of class X doesn't have attribute A set? (Except for the obvious Zope/CMF/Plone/Product upgrades, these kinds of problems happen a lot during development each time a class is changed without recreating its objects.)
Use a debugger, the sources.
- VERIFYING AND IMPROVING DATA STORAGE SCHEMAS. Does class X really store the attributes I thought it would?
In Python (at least until 2.2), attributes are usually stored in instances not in classes. This makes such an analyis quite difficult. You have to look at the sources or maybe lots of instances and perform (unsafe) inductional reasoning.
- CHANGING A PROPERTY THAT DOESN'T HAVE A MANAGEMENT INTERFACE. For debugging, testing, or migration purposes, or for just fixing a one-off bug.
Use a debugger.
The truth is, I think this kind of tool will "open my eyes" to what's in the ZODB and take much of the guesswork out of developing with Zope, similar to the eye opening experience a RDBMS admin tool is.
I do *not* think that the admin tool gives you precise information about memory size. This is too low a level, also for a relational database. Apart from that (memory size), you can already now use a debugger to get the information you want. You can use Python's inspection facility to find out the relevant information and implement an UI for this. My "DocFinder" product does this for class attributes and methods (but not instance attributes). Look at it when you need an extension for instance attributes. <http://www.dieter.handshake.de/pyprojects/zope>
I often write scripts to analyze object structure and do simple changes; I wish, however, that there would be an admin environment that provided:
- A database browsing / object inspector tool, taking away the need to write scripts for browsing/changing objects in most cases, and encouraging people to analyze and understand the database structure
It do not write scripts for this but use the debugger interactively.
- A query language that would make it even easier to write scripts (+ ZODB index support?)
Use ZCatalog and its query language.
- A place to store one-off scripts so they don't get mixed up with the application
A "Folder", when you really need the scripts.
Something like this http://www.pgadmin.org/pgadmin3/screenshots.php, but for the ZODB.
A relational database has only a few classes ("sequence", "table", "index", "constraint", ...) and all these classes are known to the framework. The ZODB in contrast has an unbounded number of classes unknown to the framework. It is far more flexible than the relational framework. Therefore, it is much more difficult to provide (useful) inspection facilities. You can get low level inspection the way I outlined above (extend "DocFinder" for instance attributes). I do not think it is useful (therefore, I have not implemented it for "DocFinder") but you may see it differently. -- Dieter
participants (12)
-
Bjorn Stabell -
Chris McDonough -
danielle d'avout -
dd -
Dennis Allison -
Dieter Maurer -
Dylan Reinhardt -
george donnelly -
Jens Vagelpohl -
Kai Vermehr -
Matthew Platte -
Paul Winkler