2009年12月4日星期五

Re: [fw-mvc] PageController + ActionStack vs. Simple MVC

Padraic,

When I made the change in my previous code base to use helpers instead of the action stack I saw an improvement of almost 30 to 40 percent in pages per second

I don't think i explained that correctly in my previous post.

--
Zend Certified EngineerJon Whitcraft
Zend Certified Engineer
jwhitcraft@mac.com



Pádraic Brady wrote:
With respect Jon, all other things being equal, there is no way the ActionStack outperformed a set of View Helpers. The margin of difference is at least 80%. If the ActionStack is outperforming VHs I'd love to know where the VH performance cost arose to break that distance.

Paddy
 
Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative



From: Jon Whitcraft <jwhitcraft@mac.com>
To: Jurian Sluiman <subscribe@juriansluiman.nl>
Cc: fw-general@lists.zend.com; Christian Ehmig <ehmig@boerse-go.de>; fw-mvc@lists.zend.com
Sent: Fri, December 4, 2009 2:00:15 PM
Subject: Re: [fw-mvc] PageController + ActionStack vs. Simple MVC

What I was told a while ago was the using the ActionStack or the $this->action() view helper is like running another request though.  I reprocesses your dispatch loop and all it's plug-ins.  This is really expensive for sites that have a lot of traffic as it has to run the dispatch loop x number of times.

If you actually look at the performance of doing it with the action stack vs doing it with custom view helpers you actually see a rise in pages per second served.
--
Zend Certified EngineerJon Whitcraft
Zend Certified Engineer
jwhitcraft@mac.com



Jurian Sluiman wrote:
I have almost the same usage. I create "pages" in XML which are decoupled from  the modules. I.e. a contact page uses the module "text" to render some text  and the module "contact" for the contact form. A page "Threecolumns" is just  as simple as three times the module "text" being called. But there are pages  ("blog") which just contains the blog module.  I have posted about this issue some time ago, but nobody is able to justify  why you shouldn't use the action helper / stack in this context. Of course you  shouldn't use the stack for breadcrumbs or other *very simple* placeholders  (like your shopping cart inside a storefront module).  But these "blocks" where Christian (I think) and I am talking about are much  more than some simple placeholders. So I don't seem how you're able to use  view helpers with very complex situations.  Regards, Jurian   

没有评论: