Dear All,
As we all know that performance of appendToDocumentList service is a bottleneck if we are using it on a loop in which we are having 1000 + records and in webMethods 6 & 7 versions.
Up-to my understanding it uses below logic in java for its implementation.
A list is implemented as a Java array. When another item is added to the list, a new array, original array length + 1, is allocated and the references from the original array are copied over.
And as per the webMethods performance documents, the performance is purely dependant on JVM rather webMethods IS.
Did anyone see any performance issues with this service in wM8 or above versions.
Based on my experience I have never faced any performance issues atleast from wM 8.2.2 onwards.
Little care should be taken while using the appendToDocumentList as documents contained in fromList and fromItem are not actually appended as entries to toList . Instead, references to the documents in fromList and fromItem are appended as entries to toList . Consequently, any changes made to the documents in fromList and fromItem also affect the resulting toList .
Not really but also its depends on how much you allocate jvm heap min/max size to the IS and having said that complex loops with conditions utilizing appendToDocument list (calling as transformer vs direct service) is always prone to performance issues especially when dealing with nuemorous iterations! and make sure you drop the temp vars in the pipeline with in the loop (fromItem and source toList)
If it is small list, that’s OKAY. No need to worry. Try it yourself the same logic , using explicit looping or addToList. You will see the difference in performance. If it is small list, the difference is negligible. But larger lists will give you clear indication. In arrays the allocation of memory is linear; whereas in documentList it is exponential. Of course the latest JVM engines will give better performance than old.
Mahesh : Kindly answer the below lines for better understanding.
In which scenario did you use appendToDocumentList?
What is the size of records did you use?
Which version of JVM did you use ?
What min, max memory settings did you set ?
How did you calculate the performance ?
Did you use any 3rd party tools to calculate the performance ?
In which OS did you observe the results ?
The implementation of the service has not changed in recent versions. Therefore, if dealing with a large list and/or if performance is a major concern, save yourself the trouble and use an “array list”-based approach. For optimal performance, initialize the array list with a size that is large enough to hold all the data that will be appended to it.