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

Reduce bytes to strings allocs in decoder #367

Merged
merged 4 commits into from
May 21, 2023

Commits on May 6, 2023

  1. Reduce bytes to string allocs in decoder

    Instead of allocating when converting
    small byte slices to strings in the decoder,
    we can write to a 4kb buffer and use unsafe.String
    which refers to that buffer.
    This approach was successfully tested in
    https://github.com/marselester/systemd which is used
    by https://github.com/parca-dev/parca-agent.
    
    Note, BenchmarkUnixFDs showed 8 allocs reduction.
    With larger dbus messages, the savings should be significant.
    marselester committed May 6, 2023
    Configuration menu
    Copy the full SHA
    8507e7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4db16c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cfacdda View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab0b98d View commit details
    Browse the repository at this point in the history