[Zope-dev] CookieCrumbler and WebDAV
CookieCrumbler doesn't seem to allow cookie authenticifation over WebDAV. It stops authentication if the request is not PUT, GET or POST and also it stops anything over the webdav source port. Anybody knows WHY? I took this code for my Cookie Identification plugin for PLuggableUserFolder, so it does the same, but we now have a client whos WebDAV client seems to try to use cookies, adn that fails of course. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] TAL, DTML Folder question
Hello, I've the following line in a pagetemplate at the root of my site : span tal:content=structure template/masters/nieuws/homenews/span homenews is a DTML Method with the following code : div align=center class=titelLaatste Masters nieuws/div img src=gfx/tabel/lijn.gif width=100% height=2br dtml-in expr=objectValues('DTML Document') reverse size=3 sort=id orphan=0 dtml-if Publish dtml-var Date fmt=%d-%m-%Y:nbsp; a href=masters/nieuws/dtml-var id/newstemplatedtml-var title/abr /dtml-if /dtml-in This code has to show the last 3 news items (DTML Document's). Something is going wrong with a folder or somethin like that because the DTML Method show no news items. Mayby because there are no DTML Document with the right properties in the root. How can I tel Tal or the DTML Method to look for the news items in the following folder: /masters/nieuws Who can help me ? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] debugging memory leaks
Seb Bacon wrote: So, say Foo is leaking because it is referenced from O which can't be collected. Given 100 things which refer to Foo, how do I identify which one is O? And of course, then O may be leaking because it is referenced from P... I sense this question is a bit like asking someone to explain how to solve a Rubik's Cube in 3 words. Well, I have come to some kind of resolution, though I am still slightly mystified. Here's the sequence of events, in case they are of any help to others (doubtful...). Although there probably is a memory leak in my application, the one I thought I was hunting wasn't what was causing my server collapse. At first, I noticed that memory usage was increasing linearly over time until the server expired. I examined reference counts for all the classes therein, mainly using Shane's LeakFinder product (I could have used the refcounts listing on the control panel, but I found the LeakFinder's reference count display tab nicer to use.) I noticed that references to a particular Foo class were increasing in direct proportion to the memory usage, apparently without bound. I also noted that Foos are involved in reference cycles. I guess from this that maybe Foos were leaking somehow - which was incorrect. There is nothing wrong with reference cycles *per se* (see earlier in this thread). Then I looked at Bars, which were referencing Foos. Given the way that Foos are implemented (with mutual references to each other) and the fact that there may be several Foos stuck on a Bar, then a leak in a Bar could have a big knock-on effect of creating a whole ton of Foos. The number of references to Bars was also increasing without bound. This went on for ages. Worth mentioning is Barry's cool reference visualisation tool (see earlier in this thread). I had already tried my application using Zope 2.6.2 (it was on 2.6.1 before) and noted reference counts also going up rapidly, so it wasn't that, I decided. To cut a long story to a medium length, it *was* that. When using 2.6.2, I noticed that if I forced garbage collection, the refcounts went down. Going over to the database connection caches, I noted that in Zope 2.6.1 the number of cache entries bore no relation to the target cache size. In Zope 2.6.2, it did. In other words, the way my application is implemented means that *lots* of references can accumulate in the space of a single request, and something about these references meant that they were never getting cleared out of the cache by Zope 2.6.1. The cache was the culprit. Moral: always keep on top of those Zope releases ;-) What's puzzling me is that I can't see anything that changed between 2.6.1 and 2.6.2 which might have fixed this behaviour. Seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] CookieCrumbler and WebDAV
On Thu, 06 Nov 2003 14:38:03 +0100 Lennart Regebro [EMAIL PROTECTED] wrote: CookieCrumbler doesn't seem to allow cookie authenticifation over WebDAV. It stops authentication if the request is not PUT, GET or POST and also it stops anything over the webdav source port. Anybody knows WHY? CookieCrumbler is expressly designed for interactive login with a human through a web browser. It steps out of the way for WebDAV because it is not appropriate to subvert the normal HTTP authentication mechanism in that case. WebDAV clients cannot display the HTML login form that CookieCrumber returns. Actually in some cases (like MS Office) they can display the form and they mistakenly think that is the document the user requested 8^( I took this code for my Cookie Identification plugin for PLuggableUserFolder, so it does the same, but we now have a client whos WebDAV client seems to try to use cookies, adn that fails of course. It might be reasonable not to bail so early, however. Maybe it would be better to bail only if there wasn't a proper authentication cookie already. Instead it should try to use it to authenticate. -Casey ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] KeywordIndex performance / multiunion
A simple query for [A or B or C] against a KeywordIndex containing 27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems an absurdly long time to me. The bit of the operation that is taking the time is the part of the index which does a union of the results of each of the 3 query parameters. Reproducing this BTree union operation outside Zope in a unit test takes milliseconds. Very occasionally it takes milliseconds inside the KeywordIndex too. Something to do with memory usage perhaps? I'll continue looking into it. But main the reason I'm posting is to wonder if there any reason not to use the multiunion operator instead of the union operator in UnIndex.py... it should be faster, right? It seems a touch faster in some informal tests. Seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] KeywordIndex performance / multiunion
On Thu, 06 Nov 2003 19:11:55 + Seb Bacon [EMAIL PROTECTED] wrote: A simple query for [A or B or C] against a KeywordIndex containing 27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems an absurdly long time to me. guess This time may be caused by fetching from the database. If so, then the only way to speed it up is increase the ZODB cache or get faster disks. Try the former and see if it helps. /guess The bit of the operation that is taking the time is the part of the index which does a union of the results of each of the 3 query parameters. Reproducing this BTree union operation outside Zope in a unit test takes milliseconds. Very occasionally it takes milliseconds inside the KeywordIndex too. Something to do with memory usage perhaps? I'll continue looking into it. Are you saying that sometimes it's faster? If so, that probably supports my guess above. In those times it's all or mostly in memory. But main the reason I'm posting is to wonder if there any reason not to use the multiunion operator instead of the union operator in UnIndex.py... it should be faster, right? It seems a touch faster in some informal tests. Yes, it probably should be used. I think it is much faster when unioning very small and very large sets as well. Tim would know better, tho. -Casey ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] CookieCrumbler and WebDAV
Casey Duncan wrote: CookieCrumbler is expressly designed for interactive login with a human through a web browser. It steps out of the way for WebDAV because it is not appropriate to subvert the normal HTTP authentication mechanism in that case. WebDAV clients cannot display the HTML login form that CookieCrumber returns. Actually in some cases (like MS Office) they can display the form and they mistakenly think that is the document the user requested 8^( Yeah, that makes sense. I'm not 100% sure that the problem is cookies anymore, however, but this still helped to clear things up, thanks. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: CMF: _getViewFor() problem
Mark Wilson wrote: I'm attempting to use Plone with CMF 1.4.2 and Zope 2.7b2. I'm getting errors [...] Any info gratefully received. Thanks 1.) This list is for development *of* Zope, not *with* Zope. 2.) See http://plone.org/development/lists for Plone lists. 3.) You know Plone 1.x requires CMF 1.3.3, Plone 2.x requires CMF 1.4.2? 4.) If you still want to modify Plone 1.x: Search plone-users archives at gmane for _getViewFor. HTH, Yuppie ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] KeywordIndex performance / multiunion
[Seb Bacon] But main the reason I'm posting is to wonder if there any reason not to use the multiunion operator instead of the union operator in UnIndex.py... it should be faster, right? It seems a touch faster in some informal tests. [Casey Duncan] Yes, it probably should be used. I think it is much faster when unioning very small and very large sets as well. Tim would know better, tho. time.clock() knows best wink. multiunion() has a systemic algorithmic advantage when applied to at least 3 input sets: its runtime is proportional to the sum of the sizes of the input sets. A plain union of two sets also has runtime proportional to the sum of the sizes of its input sets, but if all you've got is plain two-argument union, it's not possible to unite N sets in time proportional to the sum of their sizes. You have to pick some pair to unite first, and at worst that result has a size equal to the sum of the sizes of its inputs, and tnat larger intermediate result has to feed in again to a later union (etc). OTOH, two-argument union crawls over its input sets once each. multiunion() crawls over each of its inputs essentially six or seven times each (once to extract the values, once for each of 4 passes of a bytewise radix sort, once over the sorted result to weed out duplicates, and once again over the duplicate-free sorted result to stuff the integers back into a set object). That implies the relative timing results can be data-dependent -- and they are. The more input sets you have, though, the harder it is for a chain of two-input unions to overcome multiunion's ever-growing algorithmic advantage. Of course, if the data isn't already in memory, none of that matters unless you've got many sets to unite (data fetch time will dominate). ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] dir()
I started to program for Zope and have found out, that some commands in Python have been excluded. I miss command dir(). Whether there is any opportunity to replace it? Or how I can find out methods/properties of object? You can get a Python console to the live Zope system using 'zctl.py debug', which uses ZEO. It's neat. Search zope.org. Also, DocFinderEverywhere might help you. --jcc -- Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design. (http://www.devx.com/java/editorial/15511) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: CMF: _getViewFor() problem
OK - thanks for the links. I will investigate further. Mark ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )