While we've got a few spare cycles, we thought to pursue this whole performance thing some more. We grabbed hold of the GNU Trove collections implementation and started converting 3.2.0 source to use these collections. So far we have only done it partially in one strategic area. Working off the server branch of the source, we have converted the metadata processing, the base proxy factory, and the session containers to using the Trove implementations for HashMap, HashSet and so on. At this stage, only on the container classes (Container, StatelessSessionContainer, ...) have really been changed to any extent.
Also, we made some basic changes in the source where Lists are being used but the traversals are being performed using the Iterator. It seemed like the poorer memory use by the List was combined with the poorer access method of the base collection - according to theory, anyway. It gives a solid base level interface but we wondered whether internally, you could take advantage of the knowledge the collection was an ArrayList [get(i) over hasNext()/next()]. We tried that on the getChildrenByTagName with an implemented getChildArrayByTagName for the metadata. Boot time did not seem to change substantially - probably with small amounts of metadata to read per deployment unit, the performance improvement is negligible for the ArrayList versus an Iterator. We seem to have achieved a 6.5% reduction in the response time compared to the previous best results, with the limited changes we have implemented. Compared to the results from http://www.amitysolutions.com.au/downloads/JBoss-3.2.0_optimizations.pdf for those who haven't browsed it before, we obtained the following steady-state values for a 9600 sample on the same optimized JBoss test rig, running with IBM SDK 1.4.0 using a new jboss.jar and an optimized trove.jar: response time: 115 ms (down 6.5%) max: 3184 ms min: 50 ms VSZ: 184196 (down 2.96%) RSS: 129504 (down 1.61%) We'll keep playing with this when we have time and see how it goes. Remember that the improvements will always depend on many factors. With Trove, you will probably get on par or minimally small improvements with small collections, but if the numbers generated by the Trove benchmarks are anything to go by, large collections will get a sizeable performance boost from Trove. JonB
smime.p7s
Description: S/MIME cryptographic signature