Login or e-mail Password   

PRADO performance tuning for high-traffic web applications

Based on 2 years' experience with PRADO v.3.x at Note: Tips are marked with stars ( * ), where 5 stars are the most important tweaks. I. Basic settings http://www.pradosoft...
Views: 81.483 Created 12/17/2007

Based on 2 years' experience with PRADO v.3.x at

Note: Tips are marked with stars ( * ), where 5 stars are the most important tweaks.


I. Basic settings



a) Application.Mode = "Performance"  *

Time of control's templates modification isn't checked (can be set in application.xml)


b) pradolite.php   * *

Less include() function usage (just change include("framework/prado.php") to include("framework/pradolite.php”).


c) Set cache class   * * * * *

Don't generate all the data on every request. PRADO can save parsed templates, configurations etc. in cache. (can be enabled in application.xml)


d) eAccelerator   * * * * 

Now, server parses scripts once, so PHP compiler has less work to do (see: http://eaccelerator.net)



II. Advenced settings 


a) TOutputCache  * *

Not all parts of  HTML code on your page need to change every request.  Use this to cache content of the selected controls.


b) Memory cache  * *

Why not store all PRADO templates and configurations directly in the memory?  (read: Templates in memory - quick guide)


c) Generating HTML on your own  * * *

If you have looong list of items, don't use TRepeater or TDataGrid. They are easy to use, but they cost some performance and higher memory usage. (Generate HTML code in your .php file - using foreach() function by example, and then set output to TLiteral).


d) Keep pagestate in your database  * * * *

PRADO pagestate can be really big – it’s about 10kb-100kb of data. And by default, you send this data on every AJAX request!  (just use TDatabasePageStatePersister class)


e) Sometimes it's better to set PostState of ActiveControl to false  *

If you have a control like TAutoSuggest, by setting this option, you prevent PRADO from gathering all fields on a form values, on every AJAX request. ( ActiveControl.ClientSide.PostState="false" )



III. Other tips 


a) Optimize your code by using TBrowserLog

By adding this line to application.xml

<module id="log" class="System.Util.TLogRouter"><route class="TBrowserLogRoute" Levels="DEBUG, INFO, NOTICE, WARNING, ERROR, ALERT, FATAL" Categories="System" />

You can track performance on some of your functions directly in browser.


b) Enable gZip compression in your server

Lower bandwidth usage, faster page load for users.


c) Enable query_cache if your are using MySQL

Read: http://dev.mysql.com/doc/refman/5.0/en/query-cache.html


d) Performance for end user 

Remember, that server' performance isn't most important. Your visitors must feel, that the site is loading fast. Read: http://developer.yahoo.com/performance/rules.html .

Topics index from that article:

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires Header
  4. Gzip Components
  5. Put Stylesheets at the Top
  6. Put Scripts at the Bottom
  7. Avoid CSS Expressions
  8. Make JavaScript and CSS External
  9. Reduce DNS Lookups
  10. Minify JavaScript
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags
  14. Make Ajax Cacheable


Any comments are welcome.


Mariusz Zurawek, Poland, December 2007

Similar articles

comments: 11 | views: 18007
comments: 7 | views: 9015
comments: 3 | views: 14543
comments: 4 | views: 4227
comments: 1 | views: 3179

  dnavyk  (www),  02/22/2011

Cool article, but I really just don't like all this Ajax thing

  Eva Anderson  (www),  04/11/2016

Oh really! Thank you for sharing the useful information

  Seo Raushan,  12/11/2016

Satta Matka Helps You To satta Matka Result

  Kuramang,  12/15/2016

Mengentalkan Air Mani Suami
http://obatibuhamil.id/obat-po(...)-hamil/ Obat PCOS Agar Cepat Hamil
http://jellygamatcair.com/obat(...)-hamil/ Obat Hb Rendah Untuk Ibu Hamil
...  show more

  wagner,  12/26/2016

My group will move to Eclipse. It ought to spare a lot of our time on account of code blunders highlight and so on. However, the content shading ought to dependably differentiate well against the foundation. Excessively numerous pages utilizes light dim shading towards a white foundation or light blue towards a much lighter blue or bue-white foundation. http://justairports.london/

  arnald,  01/03/2017

Download Latest Lucky Patcher apk for any android device for remove license verification of apps without rooting. Lucky Patcher Latest apk download link.

  kendricknagao,  01/10/2017

Thanks for this very usefull information, great advise for me.

Oh really! Thank you for sharing the useful information http://explorewisata.com/

  elitemanchester  (www),  11 days ago

cheers for the good info

Add your opinion
You must be logged in to write a comment. If you're not a registered member, please register. It takes only few seconds, and you get an access to additional functions .

Users online: 165
Registered: 77.099
Comments: 2.278
Articles: 6.194
© 2005-2016 EIOBA group.