-
Couldn't load subscription status.
- Fork 364
link: improve page load performance #2728
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
Conversation
On initial load, instead of getting the first 25 links for every collection, only get their totals and unread counts. This drastically reduces the pageload time. Updates the frontend to match: - Handle initial results without link content. - Dynamically load in collection's links, even for page 0.
Also just use +swag instead of chaining +scag and +slag manually.
Displays "Loading..." if the links haven't loaded yet. If there are no links, tells the user they can save one.
|
king
—
~poldec-tonteg
http://urbit.org
…On Mon, Apr 13, 2020 at 12:56 PM Fang ***@***.***> wrote:
By doing more or less the same thing that chat does, where it doesn't load
in big backlog on page-load, but instead only does so when you actually go
to view the resource.
Also does some smaller refactoring things. Cleans up the pagination logic
in link-view a little bit, and refactors "message display" as used for the
link fe landing page and "loading" messages into its own component.
------------------------------
You can view, comment on, or merge this pull request online at:
#2728
Commit Summary
- link-view: add some hints to aid profiling
- link: minimal initial view result
- link-view: in pagination logic, only +lent once
- link fe: more informative "empty list" display
- link fe: refactor message display into component
File Changes
- *M* pkg/arvo/app/link-view.hoon
<https://github.com/urbit/urbit/pull/2728/files#diff-6fb0144c24fd9897761745dab09d0137>
(53)
- *A* pkg/interface/link/src/js/components/lib/message-screen.js
<https://github.com/urbit/urbit/pull/2728/files#diff-1e0799b308a040a422fcdd1dec335482>
(15)
- *M* pkg/interface/link/src/js/components/links-list.js
<https://github.com/urbit/urbit/pull/2728/files#diff-ac3e42d6e8e85b3857ccea5ac9c85975>
(87)
- *M* pkg/interface/link/src/js/components/loading.js
<https://github.com/urbit/urbit/pull/2728/files#diff-3dc3fff2ae2d331f37ee36c1d283eea1>
(11)
- *M* pkg/interface/link/src/js/components/root.js
<https://github.com/urbit/urbit/pull/2728/files#diff-5b4f55b46209c1dc76f206769efbc341>
(9)
- *M* pkg/interface/link/src/js/reducers/link-update.js
<https://github.com/urbit/urbit/pull/2728/files#diff-0cf20fa24e4d6a6321b49bc7ab49de94>
(8)
Patch Links:
- https://github.com/urbit/urbit/pull/2728.patch
- https://github.com/urbit/urbit/pull/2728.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2728>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMJBYYXE42QW43AIDHQTDTRMNVALANCNFSM4MHGFB6A>
.
|
|
(Numbers observed here differ per the amount of collections you have, but my test case with eight filled collections went from ~10 seconds to <1 second in |
|
This looks good to me but haven't tested yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks beautiful. I'll test it and get back to you.
|
When I create a collection and invite someone, and accept that invite on the other ship, the collection doesn't then show up in that ships sidebar. |
|
I can reproduce what @ixv is reporting — it's added to |
|
Hmm, get the feeling this might be an unintended side-effect from #2708. We should still auto-opt-in to unmanaged groups I guess? Will take a deeper look and push a fix. |
We still want to auto-opt-in to new collections for _unmanaged groups_, because we have no other way to join them.
|
Kinda outside of PR scope, but went and pushed a fix here. Please take a look. |
|
ping @loganallenc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complex set of changes, but it seems to work fine. LGTM
By doing more or less the same thing that chat does, where it doesn't load in big backlog on page-load, but instead only does so when you actually go to view the resource.
Also does some smaller refactoring things. Cleans up the pagination logic in link-view a little bit, and refactors "message display" as used for the link fe landing page and "loading" messages into its own component.