mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 06:33:16 -06:00
[performance] reduce InboxForward->Create calls by partially implementing Exists() (#3647)
* alphabetical reordering * keep a cache of activity IDs we have handled creates for * reduce number of inbox forwarding create calls by partially implementing Exists() * increase cache size, since all we're storing is string keys
This commit is contained in:
parent
5c0514e83c
commit
0a99901c65
6 changed files with 29 additions and 23 deletions
|
|
@ -63,6 +63,10 @@ func (f *federatingDB) Create(ctx context.Context, asType vocab.Type) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Cache entry for this create activity ID for later
|
||||
// checks in the Exist() function if we see it again.
|
||||
f.activityIDs.Set(ap.GetJSONLDId(asType).String(), struct{}{})
|
||||
|
||||
switch name := asType.GetTypeName(); name {
|
||||
case ap.ActivityBlock:
|
||||
// BLOCK SOMETHING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue