swift-server / swift-server/async-http-client
> 8% overall wall time spent for simple HTTP request on NSURL initialisation & related things
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
NSURL initialisation seems to use up about 7% wall time of an overall basic but real HTTP request (over loopback with a fast server), even for basic URLs like http://127.0.0.1:8888/.
This seems pretty steep. The flame graph in the screenshot is 15% of the wall time. ~half of that (the 8%) are just URL.init(string:)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by profiling a basic loopback HTTP request and inspect the reported flame graph around NSURL initialization and URL.init(string:). Determine whether URL construction accounts for the reported wall-time share, then measure any proposed change against the same request; done means the source of the overhead and a reproducible improvement are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100