diff options
| author | 2025-05-20 06:32:39 +0200 | |
|---|---|---|
| committer | 2025-05-20 06:32:39 +0200 | |
| commit | aa49cf4222e24535b577649add66be8f90cca17f (patch) | |
| tree | 96e63bc2a4e2a4e1869c5b84bbafe7d434d2f435 /activitypub.c | |
| parent | Improved post language markup. (diff) | |
| parent | performance: use following_list_len in more places (diff) | |
| download | snac2-aa49cf4222e24535b577649add66be8f90cca17f.tar.gz snac2-aa49cf4222e24535b577649add66be8f90cca17f.tar.xz snac2-aa49cf4222e24535b577649add66be8f90cca17f.zip | |
Merge pull request 'Faster performance metrics' (#395) from dandelions/snac2:pr-faster-metric into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/395
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index a7e133a..120b4a1 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -3204,8 +3204,7 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path, | |||
| 3204 | int total = 0; | 3204 | int total = 0; |
| 3205 | 3205 | ||
| 3206 | if (show_contact_metrics) { | 3206 | if (show_contact_metrics) { |
| 3207 | xs *l = follower_list(&snac); | 3207 | total = follower_list_len(&snac); |
| 3208 | total = xs_list_len(l); | ||
| 3209 | } | 3208 | } |
| 3210 | 3209 | ||
| 3211 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 3210 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); |
| @@ -3216,8 +3215,7 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path, | |||
| 3216 | int total = 0; | 3215 | int total = 0; |
| 3217 | 3216 | ||
| 3218 | if (show_contact_metrics) { | 3217 | if (show_contact_metrics) { |
| 3219 | xs *l = following_list(&snac); | 3218 | total = following_list_len(&snac); |
| 3220 | total = xs_list_len(l); | ||
| 3221 | } | 3219 | } |
| 3222 | 3220 | ||
| 3223 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 3221 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); |