-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy initialization of charset maps #166
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 74.41% 74.34% -0.07%
==========================================
Files 31 31
Lines 6253 6253
==========================================
- Hits 4653 4649 -4
- Misses 1322 1324 +2
- Partials 278 280 +2 ☔ View full report in Codecov by Sentry. |
thx for opening a PR! |
internal/cp/charset.go
Outdated
type charsetMap struct { | ||
sb [256]rune // single byte runes, -1 for a double byte character lead byte | ||
db map[int]rune // double byte runes | ||
} | ||
|
||
// lazy initialization of all charset maps | ||
func initCharsetMaps() { | ||
initOnce.Do(func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my guess is most apps only use 1 or 2 collations. Maybe it'd be worthwhile to lazy init them individually instead of all at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call. i'll make that change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this approach is ok but you could also merge the init into a function that returns the variable.
Something like
case 30,31,32,33,34:
return getcp437()
ideally there'd be no named variable that someone could reference without it first being initialized but I don't know if it's feasible with this model without some unnecessarily exotic dependency inversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated from init -> get in 6644c35
@microsoft-github-policy-service agree company="Grafana Labs" |
@shueybubbles @apoorvdeshmukh thanks for the review! i just wanted to check on the status of this one and see if there was anything preventing the merge/release. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `v1.51.21` -> `v1.51.25` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/cerbos/cerbos-sdk-go](https://github.com/cerbos/cerbos-sdk-go) | `be5e6dc` -> `dadcb00` | | | | | require | digest | | [github.com/golang-migrate/migrate/v4](https://github.com/golang-migrate/migrate) | `v4.17.0` -> `v4.17.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) | `v1.7.0` -> `v1.7.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/rivo/tview](https://github.com/rivo/tview) | `b0d41c4` -> `e119d15` | | | | | require | digest | | [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) | `v2.42.2` -> `v2.42.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [go](https://go.dev/) ([source](https://github.com/golang/go)) | `1.22.0` -> `1.22.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | toolchain | patch | | [go](https://go.dev/) ([source](https://github.com/golang/go)) | `1.21.1` -> `1.22.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | toolchain | minor | | golang.org/x/exp | `93d18d7` -> `fe59bbe` | | | | | require | digest | | [google.golang.org/genproto/googleapis/api](https://github.com/googleapis/go-genproto) | `26222e5` -> `8c6c420` | | | | | require | digest | | [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) | `98873a2` -> `c2a26e7` | | | | | require | digest | | [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `v1.29.6` -> `v1.29.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | --- ### Release Notes <details> <summary>aws/aws-sdk-go (github.com/aws/aws-sdk-go)</summary> ### [`v1.51.25`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15125-2024-04-19) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.51.24...v1.51.25) \=== ##### Service Client Updates - `service/glue`: Updates service API and documentation - Adding RowFilter in the response for GetUnfilteredTableMetadata API - `service/internetmonitor`: Updates service API, documentation, and paginators - `service/personalize`: Updates service API and documentation ### [`v1.51.24`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15124-2024-04-18) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.51.23...v1.51.24) \=== ##### Service Client Updates - `service/drs`: Updates service API and documentation - `service/emr-serverless`: Updates service API and documentation - `service/guardduty`: Updates service API and documentation - Added IPv6Address fields for local and remote IP addresses - `service/quicksight`: Updates service API and documentation - This release adds support for the Cross Sheet Filter and Control features, and support for warnings in asset imports for any permitted errors encountered during execution - `service/rolesanywhere`: Updates service API and documentation - `service/sagemaker`: Updates service API and documentation - Removed deprecated enum values and updated API documentation. - `service/workspaces`: Updates service API, documentation, and paginators - Adds new APIs for managing and sharing WorkSpaces BYOL configuration across accounts. ### [`v1.51.23`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15123-2024-04-17) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.51.22...v1.51.23) \=== ##### Service Client Updates - `service/ec2`: Updates service documentation - Documentation updates for Elastic Compute Cloud (EC2). - `service/qbusiness`: Updates service API and documentation ### [`v1.51.22`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15122-2024-04-16) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.51.21...v1.51.22) \=== ##### Service Client Updates - `service/bedrock-agent`: Updates service API and documentation - `service/emr-serverless`: Updates service API and documentation - `service/entityresolution`: Updates service API, documentation, and paginators - `service/iotwireless`: Updates service API and documentation - `service/lakeformation`: Updates service API and documentation - `service/m2`: Updates service API and documentation - `service/mediapackagev2`: Updates service API and documentation - `service/outposts`: Updates service API, documentation, and paginators - `service/wellarchitected`: Updates service API and documentation </details> <details> <summary>golang-migrate/migrate (github.com/golang-migrate/migrate/v4)</summary> ### [`v4.17.1`](https://github.com/golang-migrate/migrate/releases/tag/v4.17.1) [Compare Source](https://github.com/golang-migrate/migrate/compare/v4.17.0...v4.17.1) #### Changelog - [`4bc6777`](https://github.com/golang-migrate/migrate/commit/4bc6777) Add dktesting.Cleanup() method - [`bead4a9`](https://github.com/golang-migrate/migrate/commit/bead4a9) Added documentation and test for lock strategy - [`129922a`](https://github.com/golang-migrate/migrate/commit/129922a) Added support for pgx locking table - [`a860f0c`](https://github.com/golang-migrate/migrate/commit/a860f0c) Bump github.com/dvsekhvalnov/jose2go from 1.5.0 to 1.6.0 - [`d1df97b`](https://github.com/golang-migrate/migrate/commit/d1df97b) Bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.2 - [`a78d1ab`](https://github.com/golang-migrate/migrate/commit/a78d1ab) Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4 - [`2e0872f`](https://github.com/golang-migrate/migrate/commit/2e0872f) Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 - [`1b707a7`](https://github.com/golang-migrate/migrate/commit/1b707a7) Cleanup cassandra images after tests run - [`49cac86`](https://github.com/golang-migrate/migrate/commit/49cac86) Cleanup mongodb images after tests run - [`2884a8e`](https://github.com/golang-migrate/migrate/commit/2884a8e) Cleanup postgres images after tests run - [`b1d02e2`](https://github.com/golang-migrate/migrate/commit/b1d02e2) Cleanup sqlserver images after tests run - [`06614d9`](https://github.com/golang-migrate/migrate/commit/06614d9) Cleanup yugabytedb images after tests run - [`e913336`](https://github.com/golang-migrate/migrate/commit/e913336) Drop support for Go 1.20 and add support for Go 1.22 - [`f4950c1`](https://github.com/golang-migrate/migrate/commit/f4950c1) Fallback to dktest.DefaultCleanupTimeout if the dktest.Options doesn't have one specified - [`5aa4670`](https://github.com/golang-migrate/migrate/commit/5aa4670) Fix GoReleaser deprecations - [`d63a5c2`](https://github.com/golang-migrate/migrate/commit/d63a5c2) Only test against YugabyteDB LTS releases - [`091ad5d`](https://github.com/golang-migrate/migrate/commit/091ad5d) Quote locktable from config in queries - [`1a002d0`](https://github.com/golang-migrate/migrate/commit/1a002d0) Set golangci-lint to 1.54.2 (latest is broken) ([#​1046](https://github.com/golang-migrate/migrate/issues/1046)) - [`f100226`](https://github.com/golang-migrate/migrate/commit/f100226) Update dktest from v0.4.0 to v0.4.1 to fix docker vulnerability - [`ff8a961`](https://github.com/golang-migrate/migrate/commit/ff8a961) Update yugabyte test images - [`0350a00`](https://github.com/golang-migrate/migrate/commit/0350a00) \[sqlserver] Always access version table with explicit schema - [`8147693`](https://github.com/golang-migrate/migrate/commit/8147693) \[sqlserver] Ensure version table in provided schema - [`7f85f9c`](https://github.com/golang-migrate/migrate/commit/7f85f9c) chore: fix some typos - [`9d70a39`](https://github.com/golang-migrate/migrate/commit/9d70a39) chore: fix some typos in comments - [`94b8fa5`](https://github.com/golang-migrate/migrate/commit/94b8fa5) rqlite is spelled with all lowercase </details> <details> <summary>microsoft/go-mssqldb (github.com/microsoft/go-mssqldb)</summary> ### [`v1.7.1`](https://github.com/microsoft/go-mssqldb/releases/tag/v1.7.1) [Compare Source](https://github.com/microsoft/go-mssqldb/compare/v1.7.0...v1.7.1) #### What's Changed - fix: protocol version by [@​srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) in [https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131) - Implement Always Encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/116](https://github.com/microsoft/go-mssqldb/pull/116) - Update README.md Title by [@​dlevy-msft](https://github.com/dlevy-msft) in [https://github.com/microsoft/go-mssqldb/pull/143](https://github.com/microsoft/go-mssqldb/pull/143) - Feat: Implement change password during login by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/141](https://github.com/microsoft/go-mssqldb/pull/141) - Implement AKV key provider for always encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/148](https://github.com/microsoft/go-mssqldb/pull/148) - feat: Add device code and Az CLI auth types to azuread by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/149](https://github.com/microsoft/go-mssqldb/pull/149) - TDS8: Accept additional values for encrypt by [@​apoorvdeshmukh](https://github.com/apoorvdeshmukh) in [https://github.com/microsoft/go-mssqldb/pull/125](https://github.com/microsoft/go-mssqldb/pull/125) - Add note on CLI authentication by [@​dlevy-msft](https://github.com/dlevy-msft) in [https://github.com/microsoft/go-mssqldb/pull/151](https://github.com/microsoft/go-mssqldb/pull/151) - fix(CharsetToUTF8): use strings.Builder by [@​konart](https://github.com/konart) in [https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154) - Add support for DER certificates by [@​apoorvdeshmukh](https://github.com/apoorvdeshmukh) in [https://github.com/microsoft/go-mssqldb/pull/152](https://github.com/microsoft/go-mssqldb/pull/152) - Replace panic with returning errors from key decryption providers by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/155](https://github.com/microsoft/go-mssqldb/pull/155) - Feat: Allow krb5 config through environment variables by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/157](https://github.com/microsoft/go-mssqldb/pull/157) - fix: Added multisubnetfailover option, set to false to prevent issue [#​158](https://github.com/microsoft/go-mssqldb/issues/158) by [@​abairmj](https://github.com/abairmj) in [https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159) - Fix mappings between LCIDs and code pages. by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/169](https://github.com/microsoft/go-mssqldb/pull/169) - Cut string output parameter fix by [@​El-76](https://github.com/El-76) in [https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168) - Lazy initialization of charset maps by [@​toddtreece](https://github.com/toddtreece) in [https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166) - Handle alternate form of prelogin response by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/175](https://github.com/microsoft/go-mssqldb/pull/175) - Handle `NULL` values in `UniqueIdentifier.Scan()` by [@​ngehrsitz](https://github.com/ngehrsitz) in [https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163) - Fix: Support nullable types in Always Encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/179](https://github.com/microsoft/go-mssqldb/pull/179) - Fix named pipe path handling to preserve "." by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/178](https://github.com/microsoft/go-mssqldb/pull/178) #### New Contributors - [@​srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131) - [@​konart](https://github.com/konart) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154) - [@​abairmj](https://github.com/abairmj) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159) - [@​El-76](https://github.com/El-76) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168) - [@​toddtreece](https://github.com/toddtreece) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166) - [@​ngehrsitz](https://github.com/ngehrsitz) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163) **Full Changelog**: microsoft/go-mssqldb@v1.5.0...v1.7.1 </details> <details> <summary>vektra/mockery (github.com/vektra/mockery/v2)</summary> ### [`v2.42.3`](https://github.com/vektra/mockery/releases/tag/v2.42.3) [Compare Source](https://github.com/vektra/mockery/compare/v2.42.2...v2.42.3) #### Changelog - [`9b4107f`](https://github.com/vektra/mockery/commit/9b4107f) Fix bug when last argument is a function with multiple return values - [`b1c5f6e`](https://github.com/vektra/mockery/commit/b1c5f6e) Merge pull request [#​774](https://github.com/vektra/mockery/issues/774) from LandonTClipp/issue\_766 - [`adedaa2`](https://github.com/vektra/mockery/commit/adedaa2) Update codecov.yml - [`a382dd5`](https://github.com/vektra/mockery/commit/a382dd5) remove unnecessary config </details> <details> <summary>golang/go (go)</summary> ### [`v1.22.2`](https://github.com/golang/go/compare/go1.22.1...go1.22.2) ### [`v1.22.1`](https://github.com/golang/go/compare/go1.22.0...go1.22.1) </details> <details> <summary>cznic/sqlite (modernc.org/sqlite)</summary> ### [`v1.29.8`](https://gitlab.com/cznic/sqlite/compare/v1.29.7...v1.29.8) [Compare Source](https://gitlab.com/cznic/sqlite/compare/v1.29.7...v1.29.8) ### [`v1.29.7`](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.7) [Compare Source](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.7) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cerbos/cerbos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhcmVhL2RlcGVuZGVuY2llcyIsImJvdHMiLCJraW5kL2Nob3JlIl19--> --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Charith Ellawala <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Charith Ellawala <[email protected]>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) | `v1.7.0` -> `v1.7.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>microsoft/go-mssqldb (github.com/microsoft/go-mssqldb)</summary> ### [`v1.7.1`](https://github.com/microsoft/go-mssqldb/releases/tag/v1.7.1) [Compare Source](https://github.com/microsoft/go-mssqldb/compare/v1.7.0...v1.7.1) #### What's Changed - fix: protocol version by [@​srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) in [https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131) - Implement Always Encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/116](https://github.com/microsoft/go-mssqldb/pull/116) - Update README.md Title by [@​dlevy-msft](https://github.com/dlevy-msft) in [https://github.com/microsoft/go-mssqldb/pull/143](https://github.com/microsoft/go-mssqldb/pull/143) - Feat: Implement change password during login by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/141](https://github.com/microsoft/go-mssqldb/pull/141) - Implement AKV key provider for always encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/148](https://github.com/microsoft/go-mssqldb/pull/148) - feat: Add device code and Az CLI auth types to azuread by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/149](https://github.com/microsoft/go-mssqldb/pull/149) - TDS8: Accept additional values for encrypt by [@​apoorvdeshmukh](https://github.com/apoorvdeshmukh) in [https://github.com/microsoft/go-mssqldb/pull/125](https://github.com/microsoft/go-mssqldb/pull/125) - Add note on CLI authentication by [@​dlevy-msft](https://github.com/dlevy-msft) in [https://github.com/microsoft/go-mssqldb/pull/151](https://github.com/microsoft/go-mssqldb/pull/151) - fix(CharsetToUTF8): use strings.Builder by [@​konart](https://github.com/konart) in [https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154) - Add support for DER certificates by [@​apoorvdeshmukh](https://github.com/apoorvdeshmukh) in [https://github.com/microsoft/go-mssqldb/pull/152](https://github.com/microsoft/go-mssqldb/pull/152) - Replace panic with returning errors from key decryption providers by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/155](https://github.com/microsoft/go-mssqldb/pull/155) - Feat: Allow krb5 config through environment variables by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/157](https://github.com/microsoft/go-mssqldb/pull/157) - fix: Added multisubnetfailover option, set to false to prevent issue [#​158](https://github.com/microsoft/go-mssqldb/issues/158) by [@​abairmj](https://github.com/abairmj) in [https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159) - Fix mappings between LCIDs and code pages. by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/169](https://github.com/microsoft/go-mssqldb/pull/169) - Cut string output parameter fix by [@​El-76](https://github.com/El-76) in [https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168) - Lazy initialization of charset maps by [@​toddtreece](https://github.com/toddtreece) in [https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166) - Handle alternate form of prelogin response by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/175](https://github.com/microsoft/go-mssqldb/pull/175) - Handle `NULL` values in `UniqueIdentifier.Scan()` by [@​ngehrsitz](https://github.com/ngehrsitz) in [https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163) - Fix: Support nullable types in Always Encrypted by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/179](https://github.com/microsoft/go-mssqldb/pull/179) - Fix named pipe path handling to preserve "." by [@​shueybubbles](https://github.com/shueybubbles) in [https://github.com/microsoft/go-mssqldb/pull/178](https://github.com/microsoft/go-mssqldb/pull/178) #### New Contributors - [@​srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131) - [@​konart](https://github.com/konart) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154) - [@​abairmj](https://github.com/abairmj) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159) - [@​El-76](https://github.com/El-76) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168) - [@​toddtreece](https://github.com/toddtreece) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166) - [@​ngehrsitz](https://github.com/ngehrsitz) made their first contribution in [https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163) **Full Changelog**: microsoft/go-mssqldb@v1.5.0...v1.7.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
Why
The initialization of the charsetMaps is on average ~5% of heap
inuse_space
on an idle Grafana instance. It would be ideal if we could avoid this memory overhead until the related code is used.Related Grafana PR: grafana/grafana#79729
What
Switch to lazy initialization of charsetMaps.