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: 102.468 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: 19 | views: 19680
comments: 5 | views: 15015
comments: 5 | views: 9548
comments: 6 | views: 4622
comments: 3 | views: 3435

  dnavyk  (www),  02/22/2011

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

  Joshua1777,  12 days ago

Useful article!

  html color,  6 days ago

Thanks for the information you brought to us. They are very interesting and new. Look forward to reading more useful and new articles from you!

  almahernandez,  yesterday

Indeed, most importantly, it must be comprehensible and satisfactory. Ie. try not to utilize midnight blue textual style on a dark foundation one of my companions cherishes doing this so individuals need to feature it to peruse it . Additionally your substance must be great! In the event that you influence it they to will come, correct? So blog about something individuals think about. http://www.essaycamp.co.uk/

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: 174
Registered: 91.385
Comments: 3.607
Articles: 7.423
© 2005-2017 EIOBA group.