You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[performance][memory] Use cached timezone when decoding values #3482
clientModule: the client (client-v2; with legacy: the v1 client)data-typesArea: type names, value encoding and decoding, row mapping, data formatsperformance
client-v2 made a new UTC ZoneId with ZoneId.of("UTC") for each value in six places. This PR uses the existing constant DataTypeConverter.UTC_ZONE_ID of client-v2 in these places. The constant is equal to ZoneId.of("UTC"), so the written bytes and the returned values do not change.
SerializerUtils.serializePrimitiveData (4 places): each Date and Date32 value, and each DateTime and DateTime64 value of a column that has no time zone.
AbstractBinaryFormatReader (2 places): getInstant on a Date or Date32 column, and the conversion of a LocalDateTime of a Dynamic or Variant column to an Instant.
Why it matters: on JDK 17, ZoneId.of("UTC") makes a ZoneRegion, new ZoneRules, a ConcurrentHashMap and a ZoneOffset[] on each call. That is 152 bytes of garbage for each value.
There is no issue for this change. It is a small change with no change of behavior.
clientModule: the client (client-v2; with legacy: the v1 client)data-typesArea: type names, value encoding and decoding, row mapping, data formatsperformance
Activity