Skip to content

ftp: keep "rawpath" and reduce allocations#18312

Closed
bagder wants to merge 4 commits into
masterfrom
bagder/ftp-rawpath
Closed

ftp: keep "rawpath" and reduce allocations#18312
bagder wants to merge 4 commits into
masterfrom
bagder/ftp-rawpath

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Aug 18, 2025

  • keep the URL decoded path around (rawpath) instead of extracting it temporarily multiple times
  • use segments from rawpath instead of strdup()ing every path segment for the dirs array
  • Reduces test 142 to use 156 allocations, down from 307 in master
  • Improves a few cases of current directory in connection ruse

bagder added 2 commits August 18, 2025 14:11
Instead of doing temporary decodes in three different places.
- Avoids allocating every path segment separately

- Improved directory handling in connection reuse
@bagder bagder added the FTP label Aug 18, 2025
@github-actions github-actions Bot added the tests label Aug 18, 2025
@bagder bagder marked this pull request as ready for review August 18, 2025 14:53
@testclutch

This comment was marked as outdated.

@bagder bagder closed this in 79eb66f Aug 19, 2025
bagder added a commit that referenced this pull request Aug 19, 2025
- Avoids allocating every path segment separately
- Improved directory handling in connection reuse

Closes #18312
@bagder bagder deleted the bagder/ftp-rawpath branch September 4, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants