-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
A lot of RPC traffic in apps is to get the URLs for attachments and icons. This is unnecessary because the mapping of a blobId or iconId to a URL is deterministic apart from the server port, which currently changes every time the app goes into the background, but once digidem/comapeo-mobile#1364 is addressed, will also be static once the server has started. Due to an unknown issue with RPC on mobile, which is causing slow round-trip RPC requests to the backend, these URL queries are regularly taking >1,000ms, resulting in slow UI rendering.
This is an umbrella issue for removing these requests in stages:
- Keep server port static after startup, implemented via Don't stop and start fastify server when app is backgrounded comapeo-mobile#1364
- Backwards-compatible (e.g. no API changes) generation of URLs in core-react, with a single request to get the server port. See feat: get attachment and icon URLs without async requests #97
- Separate server from @comapeo/core, and export synchronous URL generation functions or URL templates which can be used in the client, see Externalize fastify server comapeo-core#1099
- Return attachments and icons with URLs already included, to remove the need for separate hooks.
Metadata
Metadata
Assignees
Labels
No labels