-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tres Seaver wrote: > While profiling a page full of dynamically-generated links, I was > interested to see Python's 'urllib._fast_quote' show up quite high in > the total time list. After looking at it, I have found a pretty huge > speed win available, posted to Python's SF tracker as bug #1285086: > > > https://sourceforge.net/tracker/index.php?func=detail&aid=1285086&group_id=5470&atid=105470 > > Zope makes *heavy* use of urllib.quote (quoting each element of the path > in 'absolute_url', for instance), which makes it a particularly > interesting speedup for us.
On further consideration (and after some more profiling), I would actually prefer inlining the speedup code directly into OFS.Traversable.Traversable, to remove the extra function call as well as to avoid the gnarliness of monkey-patching Python. An alternative would be to call 'quote' only once (for the completed string), rather than repeatedly (for each path element). The SF traffic for the bug is interesing: the fix checked in is an improvement, but not nearly as big a win for the case (very common in English-language Zope sites, anyway) where the path elements are already URL safe. Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDJXob+gerLs4ltQ4RAlgbAKCEP2yIxCetpiY9SW2+BDr5PJFfTACgoS9H c8X+2m06eCpNhZTcKpsunv0= =u0g7 -----END PGP SIGNATURE----- _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )