Skip to content

perf(raw): resolve the local path only for an offload [stable0.9] - #234

Merged
ernolf merged 1 commit into
stable0.9from
ncmake/backport/232/stable0.9
Dec 2, 2026
Merged

ernolf merged 1 commit into
stable0.9from
ncmake/backport/232/stable0.9

Conversation

@ncmake-updater

@ncmake-updater ncmake-updater Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #232 to stable0.9, by the ncmake backport workflow.

Commits:


Closes #230

  • returnRawResponse() first asks the configuration whether an offload can happen at all (raw_sendfile_backend, raw_sendfile_allow_private, raw_sendfile_min_size_mb) and resolves the local path of the file only then. Before, every request resolved it, also with the offload off.
  • tryResolveLocalPath() asks only a local storage. A storage that is not local (object store, server-side encryption, external storage) answers getLocalFile() with a temp copy of the whole file, which nothing used afterwards.
  • When the local path was sniffed already and the offload does not happen, the stream does not sniff again, and it no longer recomputes the MIME type of the node.
  • With the offload off, the debug header X-Raw-Offload now always says backend_off; for a storage that is not local it said no_local_path.

perf(raw): resolve the local path only for an offload

Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>

(cherry picked from commit 51d2b98)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions Bot added backport Backport of a change to a maintenance branch enhancement New feature or request php Pull requests that update php code labels Dec 2, 2026
@ernolf
ernolf merged commit 8343130 into stable0.9 Dec 2, 2026
54 checks passed
@github-actions
github-actions Bot deleted the ncmake/backport/232/stable0.9 branch December 2, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backport of a change to a maintenance branch enhancement New feature or request php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant