- String caching now uses buckets to improve concurrent decoding. On 64-bit
systems, the table grows from 64 KiB to 72 KiB and is allocated only when an
eligible string is decoded. Entry capacity grows from 4,096 to 7,168, which
can also increase retained string memory. Pull request by James Ranson.
GitHub #252. - Standalone
mmdbdata.NewDecodercalls now default to no string cache.
This reduces setup cost for short-lived decoders. Use the new
mmdbdata.WithStringCache()option for repeated reads through a retained
decoder or its cursors. Without the option, repeated string reads can
allocate more and run slower. Cursors supplied by aReadercontinue to
share its caching policy. - Added
mmdbdata.Decoder.CursorAt(offset)to read independent records from
one buffer without changing the decoder's position. The cursors share its
string cache and can be read concurrently while the buffer remains valid
and unchanged. - Reduced
maxminddb-gengeneration and test time by reusing loaded dependencies
during output validation, avoiding duplicate syntax work, and omitting unused
parser metadata. Full type checking and generated-output validation remain
enabled. Validation normalizes paths from package loaders to avoid false
duplicate declarations. GitHub #256. - Reduced reflection decoding overhead for string struct fields, including
fields read through database pointers, while retaining existing validation
and custom unmarshaling behavior. - Shared string-cache handling between map keys and decoded string values.
- Fixed
Reader.Verify()accepting invalid UTF-8 values overwritten by
duplicate map keys. Verification now checks every encoded string in the data
and metadata sections, including overwritten values. - Fixed
maxminddb-genrejecting fields that use type aliases of supported
types, including aliases in nested containers. - Fixed
maxminddb-genpanicking when a byte slice or its elements use an
imported type alias. - Fixed
maxminddb-genemitting inaccessible type names for imported container
aliases with private element or map key types. Generated helpers infer those
types while retaining allocation, overflow, and size checks. - Fixed
maxminddb-genemitting private byte aliases in constraints for nested
byte slice aliases. - Fixed
maxminddb-genemitting inaccessible types for imported aliases whose
generic arguments contain private types, fields, or methods.