pull down to refresh
21 sats \ 4 replies \ @nout 27 Apr 2022 \ parent \ on: Daily discussion thread
Denormalization :)
At bigger scales the main option becomes key-value pairs...
DB queries are still fast. Nothing logs more than 30 ms.
I suspect the issue is my GraphQL resolvers. I need to create slow logs to really figure it out but the way these things are written, I suspect a simple page rendering might require do 100 requests (and incur 100 RTTs) to the DB, which for even modest queries will accumulate into seconds fast.
reply
Yea, hard to armchair debug from here, but I wish I could help :D More logging of timestamps will help...
I see most ajax requests taking over a second. I'm guessing you have a really high qps on the graphql endpoint? It could be memory/cpu bound too?
I had a weird behavior after cleaning cache in Chrome and cold loading stacker.news, then it took 30+ seconds to open the homepage. Not sure what it was stuck on, but the (mainly js files) requests are either "stalled" or "queued".
reply
Lots of memory and CPU available is the weird part ... Must be IO bound somehow.
You're right though, if I had some decent tracing I could probably figure out what the problem is pretty fast. Working on this now actually.
reply
Also remove the "sleep_for_one_second()" type of function, that usually helps :-D
reply