Re: Best performance in templates

2007-03-02 Thread scragz

http://ilia.ws/archives/12-PHP-Optimization-Tricks.html

On Mar 1, 8:39 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
 On 3/2/07, mozart_ar [EMAIL PROTECTED] wrote:

  This would
  help to the performance of cakephp, correct? Why the script bake.php
  makes the opposite?

 Did you perform any tests to confirm your assumptions?

 If not - I would suggest do so and be surprised ;)

 Besides what Grant as written holds true.

 HTH
 Tarique

 --
 =
 PHP for E-Biz:http://sanisoft.com
 Cheesecake-Photoblog:http://cheesecake-photoblog.org
 =


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best performance in templates

2007-03-02 Thread scragz

Um, specifically:

When you need to output a large or even a medium sized static bit of
text it is faster and simpler to put it outside the of PHP. This will
make the PHP's parser effectively skipover this bit of text and output
it as is without any overhead. You should be careful however and not
use this for many small strings in between PHP code as multiple
context switches between PHP and plain text will ebb away at the
performance gained by not having PHP print the text via one of it's
functions or constructs.

On Mar 2, 1:20 am, scragz [EMAIL PROTECTED] wrote:
 http://ilia.ws/archives/12-PHP-Optimization-Tricks.html

 On Mar 1, 8:39 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote:

  On 3/2/07, mozart_ar [EMAIL PROTECTED] wrote:

   This would
   help to the performance of cakephp, correct? Why the script bake.php
   makes the opposite?

  Did you perform any tests to confirm your assumptions?

  If not - I would suggest do so and be surprised ;)

  Besides what Grant as written holds true.

  HTH
  Tarique

  --
  =
  PHP for E-Biz:http://sanisoft.com
  Cheesecake-Photoblog:http://cheesecake-photoblog.org
  =


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best performance in templates

2007-03-02 Thread Dr. Tarique Sani

On 3/2/07, scragz [EMAIL PROTECTED] wrote:

 Um, specifically:

 When you need to output a large or even a medium sized static bit of
 text it is faster and simpler to put it outside the of PHP. This will
 make the PHP's parser effectively skipover this bit of text and output
 it as is without any overhead. You should be careful however and not

Been there read that many many months ago and got over it :)

What ilia fails to mention is at what point the performance starts to
suffer - I have personally tested this with 60 context switches and
did not find the difference worth the lack of maintainability.

That said I know about a very huge Internet company who use PHP a
great deal to compile the multiple page breaks into a single one but
then they get billions of visitors

Cheers
Tarique

P.S. I guess this is what Chris means when he says Just build it Damn it!!

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Best performance in templates

2007-03-01 Thread mozart_ar

when we wrote templates for the views, I believe that he is better to
put everything within the labels of php, in place to open and to close
whenever we needed to accede to some variable or to helper. This would
help to the performance of cakephp, correct? Why the script bake.php
makes the opposite?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best performance in templates

2007-03-01 Thread Grant Cox

Do you mean that the entire view file should be wrapped in ?php  ... ?
, and the actual html elements are all output using echo ?

While this may actually be faster, it is far more difficult to develop
and maintain - and the main aim of CakePHP is to make application
development (and support) faster and easier.  By all means you can
rewrite your own views however you like, and deal with these issues
yourself, but I wouldn't recommend it :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best performance in templates

2007-03-01 Thread mozart_ar

after some tests with eAccelerator + cacheAction, using ab of
apache, I did not find differences of performance between, to use a
single block () and to use a block php by each echo.
thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best performance in templates

2007-03-01 Thread Dr. Tarique Sani

On 3/2/07, mozart_ar [EMAIL PROTECTED] wrote:
 This would
 help to the performance of cakephp, correct? Why the script bake.php
 makes the opposite?

Did you perform any tests to confirm your assumptions?

If not - I would suggest do so and be surprised ;)

Besides what Grant as written holds true.

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---