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. 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. 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. 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