frissyn / ReplCustoms

A database of users, posts, and comments from the ReplTalk API
https://rc.frissyn.repl.co
MIT License
15 stars 4 forks source link

Async is used Synchronously #37

Closed ghost closed 4 years ago

ghost commented 4 years ago

The server uses async functions, like the one to get leaderboard data, synchronously, and waits for them to complete before sending them to the client. This makes requests/responses very slow. A better solution (IMO) would be some sort of stream or P2P HTTP endpoint where you send data as it comes, and then show a loading screen while the leaderboard is loading.

github-actions[bot] commented 4 years ago

First Issue - Thanks for your contribution! (OwO)

PotentialStyx commented 4 years ago

We already have something like that for users and posts where it has a loading screen while the request is being made so something like that? (I'm talking about the rework rn)

PotentialStyx commented 4 years ago

I implemented a loading screen for the leaderboard in the rework try it out here: leaderboard

frissyn commented 4 years ago

Like codemonkey said, we have a loading page already implemented in the rework which is scheduled to be released by the end of the month. :)