Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize registry fetch latency #29

Closed
jmrossy opened this issue May 13, 2024 · 3 comments · Fixed by #78
Closed

Optimize registry fetch latency #29

jmrossy opened this issue May 13, 2024 · 3 comments · Fixed by #78
Assignees

Comments

@jmrossy
Copy link
Collaborator

jmrossy commented May 13, 2024

Capturing thoughts from discussion here: https://discord.com/channels/935678348330434570/1238863226419023892

There are many options for ways we can optimize this:

  1. Assemble all chain metadata and/or address files into one file during registry build
  2. Add backend caching to warp ui + explorer apps
  3. Pre-fetch data at build time
  4. Refactor apps to allow lazy-loading of data
@jmrossy jmrossy self-assigned this May 13, 2024
@jmrossy jmrossy converted this from a draft issue May 13, 2024
@jmrossy jmrossy moved this to Backlog in Hyperlane Tasks May 13, 2024
@jmrossy
Copy link
Collaborator Author

jmrossy commented May 13, 2024

I like option 1 the best because it makes the improved latency available to all registry users, not just those that have custom caching / build-time logic implemented. It's also the easiest to do.

@jmrossy
Copy link
Collaborator Author

jmrossy commented Jun 27, 2024

Snippet from more discord discussion: https://discord.com/channels/935678348330434570/1243986495916736632/1246957837805162669

...having thought through it more, all the options have downsides. Build-time chain data assembly would require contributors to have the JS tooling (e.g. yarn). PR CI-time requires a github token with write perms, which would complicate things for registry forkers. Ditto for a post-PR-merge CI job.
I'm still open to Yorke's suggestion of downloading the full repo but I think the size will scale up fast as more chain + token logos are added. And I suspect the decompression step will have pitfalls of its own.

@jmrossy
Copy link
Collaborator Author

jmrossy commented Jul 2, 2024

In the end I was able to make CI-based updates work well enough.

@jmrossy jmrossy moved this from Next Sprint to In Review in Hyperlane Tasks Jul 3, 2024
jmrossy added a commit that referenced this issue Jul 5, 2024
### Description

Fixes #29 

- Add combined chain address and metadata files
- Update combined files in build
- Add CI job to update combined files on push

#### Other notes

### Backward compatibility

Yes

### Testing

Updated unit tests to exercise new code and files

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paul Balaji <[email protected]>
@github-project-automation github-project-automation bot moved this from In Review to Done in Hyperlane Tasks Jul 5, 2024
github-merge-queue bot pushed a commit to hyperlane-xyz/hyperlane-monorepo that referenced this issue Jul 10, 2024
### Description

Update to latest registry for faster and more efficient chain
metadata/address fetching

### Related issues

hyperlane-xyz/hyperlane-registry#29


### Backward compatibility

Yes

### Testing

Ran CLI registry commands locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants