I just made a few improvements to #GAGSProject! they’re really just small UI things to hopefully make it clearer how GAGS works - like how to find the blacklist textbox and what the tabs in the search results do
my next project is going to be much bigger though: currently GAGS will only fetch the first 100 results when you search for something, because it has to fetch all of the results right away and that’s really slow (this is before it does the gender filtering btw)
but, I think there might be a way for me to lazily fetch results as you click “next page” instead. I have two different ideas for how to do this and I’m going to see if I can make either of them work. if so, GAGS should theoretically be able to fetch as many results as you want and it shouldn’t even be any slower than its current behavior
ugghh I just learned that #GAGSProject has not been running as async as I thought it was. while it’s rendering the results for one user’s request, the whole server grinds to a halt and it ignores any other requests, despite the fact that everything is technically async (at least, I’m pretty sure this is what’s happening)
I think there’s some weird nuance to how Flask handles async that’s breaking it. I have no idea what that nuance might be though, so I’m probably just going to rewrite my code to use FastAPI instead and hope that that fixes it :/
my best guess is that Flask handles each request synchronously, but it handles the rendering of each individual request asynchronously. so if it’s processing request_a
and it’s await
ing something when suddenly it gets request_b
, it has to wait for all of request_a
to finish before it can even look at request_b
which, that’s really weird if so because the Flask test server doesn’t do this? like I tested it there and it is definitely able to start work on request_b
while waiting on request_a
so idk what’s going on
even if I’m wrong about what I think is going on with Flask, it’ll still be worthwhile for me to rewrite everything to use FastAPI because FastAPI is… fast. and I’d really like to see GAGS get faster tbh. it takes way too long for it to respond to requests right now