Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 10:41:32 JST Alex Gleason
Yess, finally got remote profiling working so I can figure out why my shit is so fucked. I am really using the Chrome inspector to profile my Deno backend code over an SSH tunnel. - Sexy Moon likes this.
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 10:43:44 JST Alex Gleason
Well, there's the problem. 4 seconds for a single tick. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 10:44:33 JST Alex Gleason
Shit man, maybe the database actually is the bottleneck 🥲 -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 10:51:59 JST Alex Gleason
Okay, I think I understand what's happening. I render a page of 20 statuses. For each status I query the author as a separate query. This results in 20 additional queries. I need to make my views pure functions, query all the data up-front and pass them in.
God I love this. So glad I finally got this set up.Sexy Moon likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 10:52:35 JST Alex Gleason
It wouldn't hurt to also put SQLite into a Web Worker. -
Embed this notice
Sexy Moon (moon@shitposter.club)'s status on Friday, 06-Oct-2023 10:52:48 JST Sexy Moon
@alex its cool to see somebody actually using a debugger -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 06-Oct-2023 11:15:53 JST Alex Gleason
@manlycoffee Yes, this is Ditto. I intentionally didn't optimize it when I built it because I believe it's better to see it struggle and fix it than to do premature optimizations. But it took me a while to figure out the dev tools so I've been wondering. Now that I have this I can fix it in an hour. -
Embed this notice
Sal Rahman (manlycoffee@techhub.social)'s status on Friday, 06-Oct-2023 11:15:54 JST Sal Rahman
@alex curious: are the 20 queries happening on the backend, or is the front-end sending some HTTP request to the front-end?