Solved! Go to Solution.
If you are adding a large number of graphics to a layer the recommended way would be to use the bulk add method public int[] addGraphics(Graphic[] graphics) rather than repeatedly calling addGraphic.
I'm interested in if you are experiencing an issue with processing large numbers of messages on application startup? Are you looking to bulk process a large number of messages where you don't care about what order they are processed?
If you are adding a large number of graphics to a layer the recommended way would be to use the bulk add method public int[] addGraphics(Graphic[] graphics) rather than repeatedly calling addGraphic. If possible it is better to collect up batches of graphics and add them in one call. Internally only one thread can be adding a graphic to a layer at a time so your threads will effectively become synchronised so a large number of threads will not necessarily improve performance.
If you can provide more detail on the failures you are seeing we might be able to help further.