title: Performance of BeanUtils vs. ReflectionToStringBuilder (for use in Bean classes)
body: <p>I have a large number of Java bean classes in my web application, and I am trying to find a simple way to implement the <code>toString()</code> methods in these beans. The <code>toString()</code> method would be used for logging throughout the application, and should print the attribute-value pairs of all attributes in the bean.</p>
  
  <p>I am trying out two alternatives:<br>
  1. <code>BeanUtils.describe()</code> (Apache commons-beanutils)<br>
  2. <code>ReflectionToStringBuilder.toString()</code> (Apache commons-lang)</p>
  
  <p>Since this is a web application expected to have high traffic, the implementation has to be lightweight and should not impact performance. (Memory use, processor use, etc are main considerations).</p>
  
  <p>I'd like to know which of these performs better according the criteria mentioned above. As far as I know, reflection is a heavy operation, but more details and insight into both these options would help me choose the optimal solution.</p>