[Kotlin/Native] Slow connection issues
i'm experiencing noticeable connection issues with Kord (branch
feature/native
on Linux). about 90% of interactions fail, i can't even defer them to respond later. so far i couldn't upload files too, and it takes 10 seconds for a message to be sent (and retrieved afterwards). what's strange is that it always takes 10 seconds. here's the code for the last part:
no such issues occur when i run on JVM. could this be related to Ktor, or maybe the curl engine itself?32 Replies
Kord won't let me use the
CIO
engine either: TLS sessions are not supported on Native platform.
well its a ktor thing not kord
send trace logs
though the first 2-3 requests were fine
i dont even know whats going on anymore
you can try manually instrumenting the http client to rule out rate limiter problems
but it’s most likely a curl problem
how would i do that?
custom plugin
or i think Http call logging is an official one
is mine
would need to remove the engine name thingy
did i just need to install it as a plugin? if so, here are the logs:
yeah curl moment
yeah this is happening to me as well
lmao
it's weird though, some requests go through instantly like that 'Connected to message'
hmm
i'll go ahead and test ktor itself
jesus fuck kotlin/native regex parsing is SLOW
how slow are we talking lmao
i didnt notice anything strange, only the first requests seem to be a little slow due to warmup
that aside, my bot also does http requests here and there, and uses supabase-kt to communicate with the database with no connection issues whatsoever
yeah it might be discord only
lol
38.561442049s
goddamn
DOT_MATCHES_ALL has shit perf
bit of a necropost but @vyfor can you try using a noop request rate limiter?
this fixes the problem for me
so if it does for you too then it would narrow down the problem
cc @LustigerLurch
i should try using the parallel rate-limiter
doesn't seem to happen with parallel either
gotta look into rest ratelimiters at some point
sorry for the very late reply, i totally missed this message. i'll give it a go rn
of course kord wont build for me
windows moment
yup that was the case
wish they had setup an action to republish kordx.emoji whenever kord is republished
yup that seems to be working so far
pulling all into one repo would also solve this, been having this in the back of my head for some time
hmm
in case you dont end up merging them into one, you might wanna look into
repository_dispatch
not sure why it's happening in the first place, having to republish every time is a painI am still against putting everything into one repo
i forgot why, so why?
Esentially I don't want to make another androidx
The biggest problem with monorepos like that is:
1) slower build time
2) slower import time
3) Slower CI runs, since it's very complicated to only trigger the CI for the one part that changed
4) If we do a snapshot, we always need to update kordx.emoji as well, otherwise it won't compile, even if we just want to do a prototype of the actual feature first
5) Either we write a convoluted detection logic mentioned in 3) or kordx (and probabbly cache if we go that route) have identical versions to kord, which would end up in "empty" releases for thoes projects, which is exactly the problem with androidx's jetpack