Trim off nodeinfo attached to user in the API #827
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#827
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, the entire nodeinfo of a user's instance is attached along with a user in response. As far as I'm aware, this is only used to show their instance's software + version and favicon in akkoma FE.
While mastodon's nodeinfo is relatively slim, nodeinfo for misskey and especially pleroma/akkoma are particularly large and can go up to more than 10KB uncompressed. This significantly increases the response size. I have measured the nodeinfo-to-status size from 40 posts in home timeline (consisting of mostly mastodon posts) and 40 posts in bubble timeline (consisting of only akkoma's posts) and the ratio is respectly 28% and 60%, which is quite large.
As it's only used to show software version and favicon, I suggest filtering for only those information to send via the API, as other information is not normalized across fedi software and not useful anyways.
Some API endpoints I found that include this info (there might be more):
Here are the scripts I used to measure average nodeinfo-to-status ratio:
It’s in theory possible other frontends or apps use more of the currently included information; user responses containing metadata about their instance is documented API behaviour.
If/When this is trimmed it’s probably a good idea to survey usage across more FEs /apps first.
Afaik, there's not a client specific to Akkoma; all of those are Mastodon-first client that can also support Pleroma and Akkoma (of which only Akkoma has this). Also, as said above each instance software has its own schema for nodeinfo, so I can't imagine clients doing anything useful with those without fallback.
Still, even if we want to keep the behavior to avoid breaking these theoretical clients, we can still have an extra params, say
?trim_instance_info=true
or maybeinstance_info=full|minimal|none
, that'd also work.But as it's not an urgent issue, I agree that it's better to discuss the solution carefully.