Code-split #6228
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#6228
Loading…
Reference in a new issue
No description provided.
Delete branch "ip/code-split"
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?
Issue
Closes #6150 Finish code-splitting
There's still some testing and bug fixes left, but I'd like a review now to see if this path will have major flaws.
Test instance
https://kp.odysee.com
Changes
ui.js
reduced by 50%, allowing for faster download and earlier processing of the home page while the less-important components are being fetched.ui.js
to load first.Don't block the homepage with a spinner while waiting forHad to revert.user/me
. Instead, put placeholders on the small number of sub-components that rely on that data.Known issues
- 3rd-party CSS customizations brokenVideojsWhat's next:
claim_search
?Update (974e075 to 567e96c)
WaitUntilOnPage
CSS issues remain...
Update (974e075 to 567e96c):
resolve
was called without this, we currently don't re-resolve those claims after 'user/me' is retrieved, so the GUI is messed up.@DispatchCommit, do you have any good ideas on how to solve the CSS problem? Not lazy-loading those components with 3rd-party libraries (videojs, simplemde, etc.) would be a quick fix, but it defeats the purpose of the PR as those are the exact items that takes the longest to init during boot up.
Currently looking at https://github.com/webpack-contrib/mini-css-extract-plugin, which will break apart the css to 1-per-bundle (I think). Seems like things will get messier.
I'm considering dropping this until a better approach is found.
@infinite-persistence Does it work if you move the mde/video.js css imports to the top level app component? Not the best solution because those are still really big but that might fix it
That worked for ReachUI and Videojs. Thanks a lot for the tip!
Still had to revert lazy-loading MDE, though. It's mixing mde and codemirror -- just couldn't get the order right.
Update (b4fcbe9 to 593cf1b):
Current score
Desktop improved from ~27 to ~50:
Mobile didn't budge. It's usually because mobile includes throttling to simulate slower network/CPU, + CSS changes for mobile on our end. Something to keep in mind.