Uh oh!
There was an error while loading. Please reload this page.
cache ResultSet metadata in getMetaDataMapByMessageId to reduce per-row metadata lookups - #282
Conversation
1aa2ec3 to
e778f04CompareThere was a problem hiding this comment.
I doubt this is making actual round-trips, but unopposed to cleaning things up. At a minimum, we should drop some GC pressure from the repeated toUpperCase and fromSqlType.
Also: consider whether the move to 0-indexing is actually adding value. For the cost of two empty array elements, this PR gets a lot smaller and there's less opportunity to screw up the zero-based vs one-based indexing.
Also: missing DCO
Uh oh!
There was an error while loading. Please reload this page.
…ow metadata lookups Cache ResultSetMetaData (column count, types, and names) before iterating rows so getColumnType/getColumnName are not called for every row. Adjust column indexing and decryption logging to use the cached metadata. This reduces repeated metadata calls and improves performance when reading connector metadata from the database. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Cache ResultSetMetaData (column count, types, and names) up front instead of calling getColumnType/getColumnName for every row. This reduces repeated metadata lookups and improves performance when reading metadata rows from the database. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
…tadata lookups Cache ResultSetMetaData (column count, types, and names) before iterating rows and switch to 1-based arrays/loops so resultSet getters can be called directly with the column index. This prevents repeated getColumnType/getColumnName calls for every row and reduces per-row metadata lookups when building connector metadata maps. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
311b9d8 to
b385fd4CompareNicoPiel
commented
Mar 31, 2026
Followed your suggestions and added DCO |
jonbartels
left a comment
There was a problem hiding this comment.
I also did some digging to find out if this is a DB hit or something else. It reduces 1000s of calls to only one call per column. Its a good change. Great find Nico!
Uh oh!
There was an error while loading. Please reload this page.
Cache ResultSetMetaData (column count, types, and names) before iterating rows so getColumnType/getColumnName are not called for every row. Adjust column indexing and decryption logging to use the cached metadata. This reduces repeated metadata calls and improves performance when reading connector metadata from the database.