Skip to content

perf(async): eliminate string copies in high_performance_async_writer hot path #532

Description

@kcenon

What

high_performance_async_writer::write() in src/impl/async/high_performance_async_writer.cpp:79-86 calls to_string() three times per log entry — for message, file, and function — creating three heap allocations on every log call.

Why

  • Logging is on the hot path of every system in the kcenon ecosystem
  • Three std::string allocations per message adds measurable overhead under high throughput
  • The downstream batch_entry constructor could accept std::string_view for zero-copy

Where

  • src/impl/async/high_performance_async_writer.cpp:79-86

How

Acceptance Criteria

  • batch_entry accepts std::string_view parameters
  • write() path avoids unnecessary string copies
  • Benchmark shows reduced allocation count per log message

Metadata

Metadata

Assignees

No one assigned

    Labels

    asyncAsynchronous operationsperformancePerformance improvementspriority:highHigh priority issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions