Skip to content
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

Move new labels as string to their own build tag #1

Open
wants to merge 2 commits into
base: labels-as-string
Choose a base branch
from

Commits on Jan 17, 2023

  1. labels: shrink by making internals a single string

    Format is:
    
        [len][name0][len][value0][len][name1][len][value1]...
    
    The lengths are varint encoded so usually a single byte.
    
    The previous `[]string` had 24 bytes of overhead for the slice and 16
    for each label name and value; this one has 16 bytes overhead plus 1
    for each name and value.
    
    In `SimpleBuilder.Overwrite` and `Labels.Hash` we use an unsafe
    conversion from string to byte slice. `Overwrite` is explicitly unsafe,
    but for `Hash` this is a pure performance hack.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    ab35ec3 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Move new labels as string to their own build tag

    Signed-off-by: Julien Pivotto <[email protected]>
    roidelapluie committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    bc54767 View commit details
    Browse the repository at this point in the history