I know that Python is integrated _very_ closly to the Zope core, but to use a Python module you'll have to create an External Method and a file in the Extensions folder; and this might be slower than using DTML. Right? Basically, how much faster is DTML to Python (assuming the codes outputs the same thing)? The reason I ask is that I (probably as everybody else) want an as fast site as possible, but still use the power of Python. And also, whats the performance difference of using External python modules compared to the Python Method product? Peter Bengtsson - bloody good programmer Under UK Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of £500 damages/incident, £1500 for repeats.
On Thu, 6 Jul 2000, Peter Bengtsson wrote:
I know that Python is integrated _very_ closly to the Zope core, but to use a Python module you'll have to create an External Method and a file in the Extensions folder; and this might be slower than using DTML. Right?
Basically, how much faster is DTML to Python (assuming the codes outputs the same thing)?
The Zope core is *written* in python (with hotspots coded in python modules written in C), not just integrated with it. Since DTML must be interpreted by the Zope core (an interpreter running in an interpreter), whereas the python code in an external method is simply (more or less) executed (just one interpretation level), I would expect external methods and python products to be a lot faster than the same functionality coded in DTML. But I'm speculating here based only on my current mental model of how Zope works, so I could be wrong <grin>. --RDM
The Zope core is *written* in python (with hotspots coded in python modules written in C), not just integrated with it. Since DTML must be interpreted by the Zope core (an interpreter running in an interpreter), whereas the python code in an external method is simply (more or less) executed (just one interpretation level), I would expect external methods and python products to be a lot faster than the same functionality coded in DTML. But I'm speculating here based only on my current mental model of how Zope works, so I could be wrong <grin>.
I agree, again Im no expert, but from what I understand DTML is parsed into Python and then executed. You can skip that step altogether by not using DTML. I also find DTML is rather painful and anything involving 5 or 6 lines of DTML can be coded in *less* lines of more efficient Python!
participants (3)
-
Andy McKay -
Peter Bengtsson -
R. David Murray