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

fix(forwarder): improve CSV handling #324

Merged
merged 1 commit into from
Jul 29, 2024
Merged

fix(forwarder): improve CSV handling #324

merged 1 commit into from
Jul 29, 2024

Commits on Jul 29, 2024

  1. fix(forwarder): improve CSV handling

    A few simple performance fixes for converting CSV to JSON:
    - avoid unmarshalling if target is json.RawMessage, since that calls
      `json.Valid`.
    - avoid calling `strconv.Quote` where possible. Most of the inputs we
      handle in practice do not require special handling.
    - keep track of max record length and use it to initialize our buffer,
      which avoids resizing.
    
    In profiling, these changes reduced processing time for a VPC flow logs
    file by ~33%.
    jta committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    83effa9 View commit details
    Browse the repository at this point in the history