Showing posts with label Performance. Show all posts
Showing posts with label Performance. Show all posts

Sunday, January 20, 2013

Crystal Report Performance Improvement Tips

Problem:
How can I improve performance of crystal report in my web application?

Solution: Here is some important tips for improvement of crystal report performance in a web application:
1. Avoid using Linked OLE object if not extremely necessary. Locating OLE object is potentially time consuming.
2. Avoid using Sub-report if you can do same without sub-report. Incorrect use of sub report may have huge impact on performance.
3. Avoid special functions: Page N of M, Total Page Count. This cause the report more time to display first page.
4. Avoid unnecessary use of graphics. This may cause disk I/O which will impact on performance.
5. Remove un-used objects from report.
6. Remove or suppress unnecessary report section.
7. If summaries are used in the report, use conditional formulas instead of running totals when ever possible.
8. Whenever possible, limit records through Record selection Formula, not suppression. Return only necessary data from your data source.
9.  Perform grouping on database server.
10.Disable report option Verify of First Refresh and Verify Stored Procedure on First Refresh.

Hope this will help.

Please feel free to add your valuable comments.

Wednesday, November 16, 2011

How can I improve performance and speed of my asp.net web application?

This is a most frequently asked question in asp.net communities. I will list out some points that are important to speed up asp.net web application.
  1. Always use Page.IsValid property. Page.IsValid confirms that all validation controls in page returns valid. Execute server side code only when page is valdated.
  2. Use Page.IsPostBack property to minimize redundant processing. Confirm that only data is loaded on first time page load.
  3. Use HttpServerUtility.Transfer method.
  4. Use StringBuilder for large string manipulation. Strings are immutable. The large is string operation you need the more benefit you can get from StringBuilder.
  5. Avoid unnecessary type conversions. Type casting is costly so do it only when necessary.
  6. Use ViewState only when necessary. Use of ViewState increase page size which increase traffic load on network.
  7. Restrict use of Session state. Use of Session and Application state directly have affect on server memory. 
  8. Remove unnecessary using’s.
  9. Build your application on Release mode. Release mode avoid including debug information which increase execution of application.
  10. Precompile your Application.
  11. Use Asp.Net Caching.
  12. Enable buffering. 
  13. Use transaction properly. 
  14. Limit use of Asp.Net Server controls.
  15. Use client side validation.
  16. Don’t rely on Exception.
  17. Use finally block to dispose unnecessary objects.
  18. Avoid unnecessary round trip to the server.
  19. Avoid Use of ViewState encryption unless necessary.
  20. Disable Debug mode.
  21. Rewrite call incentive COM components in managed code.
  22. Avoid blocking and long running tasks.
  23. Take advantage of HttpResponse.IsClientConnect before performing large operation.
  24. Optimize extensive loops. for loop is faster than foreach loop. Use for loop where possible.
  25. Avoid using deep hierarchy of controls.
  26. Avoid using Page.DataBind.
  27. Minimize calling DataBinder.Eval.
  28. Use Repeater when you need to display read only data.
  29. Consider using ListView instead of GridView.
  30. Use Response.Write for formatting output.
  31. Use paging properly for large result sets. ListView or GridView that may contain more than 20 rows should have paging allowed.
  32. Use SSL only for pages that require it.
  33. Disable tracing and debugging.
  34. Consider using HTTP compression.
  35. Reduce No of HTTP requests.
  36. Removed unnecessary white space from page.
  37. Avoid MS Ajax, Consider using light weight java script library like JQuery, ExtJs etc.
  38. Use index on all foreign keys.
  39. Minimize use of cursor.
  40. Minify JS files while deploying.
  41. Put CSS on top of page.
  42. Put JS on bottom of page.
  43. Make css and java script files external.
  44. Use Content Deliver Network for static content.
  45. Consider CSS and Image sprite to reduce number of request. 
  46. Do not scale image in HTML.
  47. Batch SQL Statement to reduce round trip.
  48. Use SETNOCOUNT ON in stored procedure.
  49. Use SET TRANSACTION ISOLATION LEVEL READ COMMITTED below SETNOCOUNT ON and before SELECT queries to ensure no locks during reads.
  50. Consider index on columns used in Where, Order by, Group by and Distinct clause.
  51. Use Stored Procedure for Data Access.
  52. Use DataReader class for fast forward only data cursor.
  53. Rewrite inefficient queries to improve performance.
  54. Write paged queries to ensure that you retrieve only required data from database.
  55. Consider using connection pooling.

Thanks

Sunday, August 21, 2011

How can I measure my web page performance?

Web site speed & performance tuning tool:

There is some excellent tools for web developers for analyzing their web site performance and speed. Two grate tools are YSlow by Yahoo and Google Page Speed. These are found as browser extension or add-on. Another greate one is http://gtmetrix.com/ which combines both Google Page Speed and YSlow into an easy to read, tabbed, table of recommendations.

GTmetrix uses Google Page Speed and Yahoo! YSlow to grade your site's performance and provides actionable recommendations to fix these issues. However, it ranks the groupings of recommendations from low to high so that you can decide which one should be solved first.

If page speed is a fact to you, then these must be useful for you.