Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Common mistakes for ATG applications that affect performance

3,597 views

Published on

Some tips for ATG Developers how to improve performance of the atg application and how to avoid typical mistakes

Published in: Technology
  • Be the first to comment

Common mistakes for ATG applications that affect performance

  1. 1. COMMON MISTAKES THAT AFFECT PERFORMANCE
  2. 2. PROBLEM: SITE IS TOO SLOW
  3. 3. RESULT:ANGRYCUSTOMERS
  4. 4. HOW TO PREVENT PROBLEMS WITH PERFORMANCE? Frontend Server’s tuning DB
  5. 5. SERVER’S TUNING Apache Gzip • enable mod_deflate. Cache settings • ExpiresDefault "access plus 1 month“ Static content JBOSS trimSpaces • it helps with multiple blank lines
  6. 6. TIPS: REPOSITORIES 1. Do not use XML or HTML repositories 2. Configure repository item caching
  7. 7. TIPS: QUERIES  Avoid SQLQueryForEach, SQLQueryRange and other non-cached database querying  Don’t use RQLQueryForEach if you have the Repository Id you want, just use the RepositoryLookup droplet.  It's better to do more difficult queries in spite of simple query and a lot of calculations on application size
  8. 8. TIPS: TRANSACTIONS  Do not access repository items outside of a transaction  ATG Commerce Order object must follow a specific transactional pattern to avoid exceptions and deadlocks, ConcurrentUpdateExceptions, InvalidVersionExceptions 1. Obtain local-lock on profile ID. 2. Begin Transaction 3. Synchronize on Order 4. Perform ALL modifications to the order object. 5. Call OrderManager.updateOrder. 6. End Synchronization 7. End Transaction. 8. Release local-lock on profile ID.
  9. 9. TIPS  The sortProperties parameter of *Range, *ForEach, and Targeting* servlet beans a sortProperties parameter provides an easy way to sort items in an array.  Avoid retrieving large arrays of data just to show a few items: use the Range servlet bean to show only a few items in the current page  Example: Order History page
  10. 10. TIPS: OTHERS  Verify that the PageFilter in web.xml is bound to the right extension. Typically it's *.jsp, not /*.  Pre-Compiling JSPs  Recheck components scope  Disable Performance Monitor  Ensure that loggingDebug is disabled for all components  Disabling Document and Component Indexing  /atg/devtools/DocumentIndex.enabled=false and  /atg/devtools/ComponentIndex.enabled=false

×