There can be many reasons why transactions
use a lot of memory. Some of the typical reasons include:
- Calling APIs with the default output XML template - Sterling Selling and
Fulfillment Foundation allows
you to specify an output XML template to specify the amount of data
to return. The effect can be dramatic. Calling the getOrderDetail
API without an output template could result in a very large XML (over
40MB) depending on the order complexity. Trimming the XML could reduce
the size to a few hundred bytes.
- DEBUG and
VERBOSE tracing - The DEBUG and VERBOSE traces are invaluable development
and debugging tools, for example printing out the API input and output
XMLs. In order to print the XML, the tracing facility has to create
a String representation of the XML, which for very large XML document
can result in very large StringBuffer objects. As a result, you should
be careful about enabling these traces in production.