It takes 50-70 milliseconds to get the response from await got(url, {cache})
No network (except the first time when the cache is of course cold) should be involves so it could be all CPU.
GET:0: 145.388ms
GET:1: 64.91ms
GET:2: 53.785ms
GET:3: 58.756ms
GET:4: 58.956ms
GET:5: 56.665ms
GET:6: 58.048ms
GET:7: 50.556ms
GET:8: 53.686ms
GET:9: 56.007ms
More like ~0.1ms per request.
import got from 'got'
const cache = new Map()
async function main() {
for (const i of [...Array(10).keys()]) {
console.time(`GET:${i}`)
const res = await got(
'https://github.github.com/help-docs-archived-enterprise-versions/2.20/redirects.json',
{ cache }
)
console.timeEnd(`GET:${i}`)
//console.log(res.body.length)
}
}
main()
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too