Problem
Loops are performing poorly to generate a String via concatenation.
Possible Solutions
If you are using pub.string:concat in your loops to create larger loops then consider the use of StringBuffers.
You'll need to write some java services to:
- create a StringBuffer object and put it in the pipeline (call this before the loop)
- call append on a given StringBuffer passing in a supplied String (used inside the loop)
- call toString() on the StringBuffer to get the resulting String (call this after the loop)
Other links:
- See java looping string concat problem rears its ugly head in webMethods for more detail on webMethods and StringBuffers.
- StringBuffer versus String(javaworld article)
- The StringBuffer API documentation
Labels