digidem / digidem/comapeo-core-react
Reduce getUrl queries [umbrella issue]
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 1
- Avg merge
- 5m
- Merged PRs (30d)
- 2
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 https://github.com/digidem/comapeo-mobile/issues/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 https://github.com/digidem/comapeo-mobile/issues/1364
- Backwards-compatible (e.g. no API changes) generation of URLs in core-react, with a single request to get the server port. See https://github.com/digidem/comapeo-core-react/pull/97
- Separate server from @comapeo/core, and export synchronous URL generation functions or URL templates which can be used in the client, see https://github.com/digidem/comapeo-core/issues/1099
- Return attachments and icons with URLs already included, to remove the need for separate hooks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the staged checklist and the linked issues 1364 and 1099, along with core-react PR 97, since no files or tests are named here. Done means the listed URL-query reduction stages are completed without breaking the existing API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100