title: Java JSON Parser Buffer Size for InputStream
body: <p>I have noticed that quite a few JsonParser (including DSL Json, JsonIter, LoganSquare, etc.) have the option of parsing an InputStream, instead of a string. The idea is that You don't have to waste extra time to convert an InputString to a String, but You can parse an InputStream directly, by reading the bytes of the inputstream.</p>
  <p>I would like to compare the performance of converting the inputstream to string and then parsing it, vs parsing an inputstream or even a bufferedinputstream directly. However, every parser requires to know the buffer size of the parser.</p>
  <p>I have the following questions:</p>
  <ol>
  <li>What is an ideal buffer size that works well in most cases?</li>
  <li>How a small buffer size affects the performance?</li>
  <li>How a large buffer size affects the performance?</li>
  <li>Is there any way to find the ideal buffer size, if we can approximate the number of characters that will be read through the stream?</li>
  </ol>
  <p>Thanks.</p>