posit-dev / posit-dev/positron
Ark: Switch to using a real reqwest `Client` rather than ad hoc `get()` requests
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
See this NOTE on reqwest::get()
We don't make a massive amount of help calls, but we do perform repeated calls for a single help request (to get katex, R.css, etc) so we should probably switch to an external Client. It will probably make it a little faster.
I imagine it can be owned by HelpProxy, and maybe we can give out a clone of it to AppState to be used within proxy_request(). A Client is a wrapper around an Arc<> so its cheap to clone https://docs.rs/reqwest/latest/reqwest/struct.Client.html
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 reading HelpProxy, AppState, and proxy_request(), then review the reqwest::Client documentation linked in the issue. Trace the repeated help calls for katex and R.css and determine where one client can be owned and cheaply cloned. Done means those calls use a shared external Client rather than ad hoc reqwest::get() requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100