Skip to content

🚀 Feature: "CopyBytes" and "CopyString" should only copy if "config.Immutable" is false #2285

@leonklingele

Description

@leonklingele

Feature Description

Currently, CopyBytes and CopyString make a copy of the underlying data even if not required, i.e., when config.Immutable is set.
In order to improve performance, there should be a app.CopyBytes or ctx.CopyBytes which only copies the data if config.Immutable is false.

Additional Context (optional)

No response

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions