Comment on I made a Firefox fork with Fediverse integration
rimu@piefed.social 3 weeks ago
This is going to absolutely hammer the search API endpoint. Every single time you visit any web page there will be around 5 different requests to lemmy-instance/api/v3/search (see generateUrlVariations()
) and running a search is pretty heavy on the server.
I just read the code, didn't actually install the extension, so I could be wrong but at first glance this looks like it would cause real problems if a significant number of people started using it.
rozodru@lemmy.world 3 weeks ago
Totally understandable. I added in some rate limits, search result caching, timeout handling and error handling (to prevent retry storms), there’s also a max result limit per instance. If this WERE to take off with like 1000+ users I’d have to adjust it further. But right now as it stands the impact should be negligible.
rimu@piefed.social 3 weeks ago
All it would need is about 10 simultaneous users and the load on the server would be unacceptable to me, as an instance admin. I only run PieFed instances so this isn't going to impact me unless you add PieFed support (please don't).
rozodru@lemmy.world 3 weeks ago
Fair enough.
rimu@piefed.social 3 weeks ago
I guess if the logic for finding the posts was done on the server then you would only need one API call - the extension would just send through whatever url it had. That would be more efficient.
If this gets popular I'd be open to adding a dedicated API endpoint for this to PieFed.
Kind of a privacy nightmare though, aye. Sending your whole browser history to a third party... But that's a whole different issue.