Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
- Log when a buffer returned to a client is completely full. This can be helpful for identifying misconfigured clients that have a fetchSize that is too small
- See below code snippet
- Rows are loaded into an ArrayList called "convey." This ArrayList is instantiated with the default size (10) and is expanded on-demand as it is filled. I changed it so that this ArrayList's size is set once, on the first call to fetch, so that it doesn't have to "grow" and waste cycles and memory with GC thrashing for that.
- Some minor cleanup
try { ss = Utilities.readColumn(driverContext.getResStream(), bos); if (bos.getLength() > 0) { // use JDK StandardCharsets row = new String(bos.getData(), 0, bos.getLength(), "UTF-8"); } else if (ss == Utilities.StreamStatus.TERMINATED) { // Do not create a new string for this. Just use a hard-coded empty string. JDK: "Note that use of this constructor is unnecessary since Strings are immutable." row = new String(); } ... }