Commit Graph

11 Commits

Author SHA1 Message Date
Alexei Sorokin 8181b28441 Clear out potential duplicates when semi-joining a union
Using a left outer join as a semi-join is not a valid approach.
Can still be used for an anti-semi-join.
2021-07-16 19:44:41 +01:00
Alexei Sorokin 681aa5b326 [NOTICES] Condition pushdown in the subquery in inboxnoticestream
This improves performance on PostgreSQL.
2021-07-16 19:44:40 +01:00
Alexei Sorokin e8f5e34202 Revert "[CORE] Avoid the old "reply" relation in inboxnoticestream"
It is needed for mentions.
2021-07-16 19:44:40 +01:00
Alexei Sorokin 2de195d20c [NOTICES] Restore FullNoticeStream
But only allow a select number of verbs.
This is to display optional subscription notices.
2021-07-16 19:44:40 +01:00
Alexei Sorokin eb647f15a7 [NOTICES] Fix InboxNoticeStream caching
Introduce a new property in CachingNoticeStream for always checking if there
are any new elements in the stream.
It would be extremely hard to blow InboxNoticeStream, so instead the database
hit will still occur, but it is be much faster than starting fresh.

This fixes a regression introduced in 36a55d8436
2021-07-16 19:44:37 +01:00
Alexei Sorokin d3e63bbac0 [CORE] Avoid the old "reply" relation in inboxnoticestream
All verbs for not visible notices are filtered out, so this should not
break the timeline.
Additionally, filter by profile outside of the derived relation as that shows
better performance in PostgreSQL and MariaDB both.
2021-07-16 19:44:37 +01:00
Alexei Sorokin 819ece93aa Revert "FullNoticeStream selects all verbs"
It appears this was added to display "tombstones" of deleted notices.
However, it has other side-effects and the concept of keeping them visible has
not been adopted by the wider fediverse.
2021-07-16 19:44:37 +01:00
Alexei Sorokin a93c38a9af [CORE][DATABASE] Another approach to semi-join in the inboxnoticestream query
Compared to the solution with INNER JOIN this seems to have better performance
as there is no need to deduplicate the subquery result before use.
2021-07-16 19:44:36 +01:00
Alexei Sorokin 9396539f58 [CORE] Re-format the inboxnoticestream query 2021-07-16 19:44:36 +01:00
Alexei Sorokin 1b41a38719 [CORE] Another inboxnoticestream improvement 2021-07-16 19:44:35 +01:00
Miguel Dantas 2ab2e22a36 [LIB_REFACTOR] Moving files into separate semantic categories 2021-07-16 19:44:34 +01:00