I have the feeling that appendToDocumentList is correct when we have not a lot of records in arrays. But if the array exceed about several thousands records, performance are not good. (I don’t speach about memories on the server, I don’t forget that in my mind) I thinks there is kind of sort algorithm inside the service and this one is not really optimized.
Am I wrong and if yes, how to accumulate lot of records in a same arrays.
I have in my mind some bulkinsert instruction, so I don’t want to not use a array.