Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
10.5.1.1
-
None
-
Normal
-
Performance
Description
Read DERBY-3769 for details.
Briefly, for Clobs containing ASCII characters the content is sent over the network in smaller chunks than necessary. The reason is because the network server is unaware of how many bytes a range of characters results in when they are encoded as modified UTF-8. As exceeding the maximum size is very costly, a defensive assumption of 3 bytes per char is used. This leads to sending only 10890 bytes over the wire per round-trip instead of up to 32672 for ASCII content.
The same goes for Clobs with chars encoded by 2 bytes, or Clobs with mixed content.
A few ideas on how to solve this:
- read chars in chunks, look at each char to calculate byte length and read chars until byte buffer will be filled sufficiently
- add new method to Engine[C]LOB
- rewrite implementation to work on the byte level instead of the character level (this would be an internal API only)
- add and make use of more information about the Clob content, i.e. if it consists of only 1 byte per char encodings.
Attachments
Issue Links
- relates to
-
DERBY-3769 Make LOBStoredProcedure on the server side smarter about the read buffer size
- Closed