It’s been a week since I’ve had to do a major attitude adjustment.
I’ve created tons of local comments on this server to try and figure out what is going on with performance that lemmy.world is still blocking all comment links: https://lemmy.world/post/2697806
I really wish developer would have rushed in a fix for the ampersand munging in URL and other content… a lot of links now on Lemmy are broken because of the damage to the URL.
ok, so there is a new bug in the attempt to fix things, and there is a code comment about “denial of service” related to loading comments…
https://github.com/LemmyNet/lemmy/pull/3823/files
Ok, here is the original comment… https://github.com/LemmyNet/lemmy/commit/3b09d8c882c2effcfad9fda4ae06350dd20c0e5f
so, et me think about this, lemmy.world has blocked comment only, where no post id. Is it possible they are fetching a huge number of comments, ordering, then filtering?
What I need to see is the SQL statement before and after this commit… and try to find a pattern of data where this goes slow. OK< “If post_id filter is missing, getting comments ordered by path causes a sequence scan on the whole comments table.” - that is what I need to try and reproduce.
I’m thinking an SQL in with the post = comment id.
As the whole thing is that lemmy.world is blocking https://bulletintree.com/comment/1479898 style comment link, so there can’t be any reason to load comments for any post other than the one being read.
Diesel subquery: https://stackoverflow.com/questions/67776250/diesel-adding-result-of-subqueries
https://stackoverflow.com/questions/69139883/how-to-do-a-in-query-using-diesel