perf(mobile): reuse dev reqwest client#15444
Conversation
Package Changes Through 4e01525There are 3 changes which include tauri-utils with patch, tauri-bundler with patch, tauri with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
@DeTeam Hey, could you help give this change a try see if it improves the situation a bit? From some investigation, the time was mostly spent in the request, and each one taking 500-1000ms like you mentioned in #15071, I still don't quite understand why since it doesn't happen in the emulator's browser, but this change at least helped with the subsequent requests |
Maybe cause it's a debug build? I could imagine that there's something funny in the clientbuilder in debug builds |
Doesn't seem to be the case? I have tried with [profile.dev.package.reqwest]
debug-assertions = false
[profile.dev.package.hyper]
debug-assertions = false
[profile.dev.package.tokio]
debug-assertions = false
[profile.dev.package.mio]
debug-assertions = falseno differences When I enable tracing on hyper, I do see a big gap between not sure what's in between though, the only hint I got is seanmonstar/reqwest#1116 (comment) |
|
I don't want to waste your time but how about testing non-hyper clients (ureq?) to see if it's maybe the server's fault or maybe some weird layer in android? Since the use-case here is pretty simple i wanted to rewrite it to use hyper directly a while ago but not so sure now 😅 unless it's reqwest and not hyper 🤔 |
|
Just tried with |
Reference #14097
This allows the reqwest connection pool to work and making thing a lot faster. I still don't quite understand why it takes so much time on the first request though (close to 1 sec to me)
Example timing logs on Android emulator: