summaryrefslogtreecommitdiff
path: root/internal/processing/status
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-07-01 16:00:04 +0200
committerLibravatar kim <gruf@noreply.codeberg.org>2025-07-01 16:00:04 +0200
commit4f2aa792b33fdd5fb4b22dec813b3668d7190522 (patch)
tree1148a9322d04bf43c1c159df3079fb1790c5c154 /internal/processing/status
parent[chore] update go dependencies (#4304) (diff)
downloadgotosocial-4f2aa792b33fdd5fb4b22dec813b3668d7190522.tar.xz
[performance] add statusfilter cache to cache calculated status filtering results (#4303)
this adds another 'filter' type cache, similar to the visibility and mute caches, to cache the results of status filtering checks. for the moment this keeps all the check calls themselves within the frontend typeconversion code, but i may move this out of the typeconverter in a future PR (also removing the ErrHideStatus means of propagating a hidden status). also tweaks some of the cache invalidation hooks to not make unnecessary calls. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4303 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/status')
-rw-r--r--internal/processing/status/context.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/internal/processing/status/context.go b/internal/processing/status/context.go
index 531dff1d6..f153b2e3a 100644
--- a/internal/processing/status/context.go
+++ b/internal/processing/status/context.go
@@ -275,20 +275,6 @@ func (p *Processor) ContextGet(
requester *gtsmodel.Account,
targetStatusID string,
) (*apimodel.ThreadContext, gtserror.WithCode) {
- // Retrieve filters as they affect
- // what should be shown to requester.
- filters, err := p.state.DB.GetFiltersByAccountID(
- ctx, // Populate filters.
- requester.ID,
- )
- if err != nil {
- err = gtserror.Newf(
- "couldn't retrieve filters for account %s: %w",
- requester.ID, err,
- )
- return nil, gtserror.NewErrorInternalError(err)
- }
-
// Retrieve the full thread context.
threadContext, errWithCode := p.contextGet(ctx,
requester,
@@ -305,7 +291,6 @@ func (p *Processor) ContextGet(
requester,
threadContext.ancestors,
gtsmodel.FilterContextThread,
- filters,
)
// Convert and filter the thread context descendants
@@ -313,7 +298,6 @@ func (p *Processor) ContextGet(
requester,
threadContext.descendants,
gtsmodel.FilterContextThread,
- filters,
)
return &apiContext, nil