releases.shpreview

5.1.0

December 18, 2020Go SDKView original ↗
$npx -y @buildinternet/releases show rel_9y3wq3fUFfNfH2vikKcpJ

[5.1.0] - 2020-12-17

Added:

  • The SDK now has an optional integration with the EasyJSON library to increase the efficiency of JSON encoding and decoding. This is enabled if you add the build tag launchdarkly_easyjson to your build (go build -tags launchdarkly_easyjson); no other changes are required. If you do not set the build tag, the SDK does not reference any EasyJSON code.

Changed:

  • The SDK's default JSON encoding and decoding logic has been changed to use the new LaunchDarkly library go-jsonstream instead of Go's built-in encoding/json. This should reduce spikes in CPU and memory usage that could occur when the SDK is receiving JSON data from LaunchDarkly or from a database, especially in environments with many feature flags or complex flag configurations. There is also the option to use EasyJSON as described above, but even without that, the new implementation is much more efficient than encoding/json; depending on the size of the data, it can reduce execution time and heap allocations during JSON parsing by roughly 50%.

Fixed:

  • Removed an extra newline from the "Reconnecting in..." message that is logged for stream reconnections.

Fetched April 11, 2026