-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Performane] : Fix slow loading of Music Blocks on all the browsers #4331
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
[Performane] : Fix slow loading of Music Blocks on all the browsers #4331
Conversation
|
@apsinghdev I would love to contribute to this PR can you suggest me some reference |
Thanks @omsuneri. I'll let you know if I need help. 🙂 |
|
@walterbender Thanks for letting me know. Don't know why it didn't appear on my browser. Anyways, next task is to optimise this video as it's blocking the other ops. It's causing |
10723b3 to
14518ba
Compare
|
Update: fixed the issue: #4331 (comment) Experimented running MB using We are using SimpleHTTPServer to run Music Blocks to the client. But, SimpleHTTPServer doesn't support advanced features like Keep-Alive. I have experimented with running MB using http-server and it has Keep-Alive by default.
Also, I found http-server is comparatively fast increasing performance scores from 70 to 75 on the lighthouse.
Getting some feedback on these ideas. Will push it soon! |
|
maybe https-server? |
14518ba to
5084cf7
Compare
I've replaced |
|
@walterbender I've used a custom server using I tested it and it is showing really good performance.
If you get a chance, please test 62397de |
|
Seems good to me. |
62397de to
e6ad80f
Compare
Thanks! I'll do more testing. |
e6ad80f to
901de5c
Compare
|
@walterbender, I've fixed most of the critical issues blocking MB's loading process. I've noticed two main issues that need to be worked on:
To tackle both of these issues we'd need to plan about it as these are big breaking changes that will impact the whole codebase. For now, I've made this PR ready and will work on this issue as we discuss further. Please have a look. |
|
@apsinghdev The video perfectly fills the screen now. However, the loading text is now missing. As for load time, I tested the master branch and 62397de with the default Sol, Mi, Sol code. Both took 13 seconds to load. |
|
@pikurasa Thanks for your feedback! I'll fix the missing loading text issue. Also, which tool have you used to calculate the load time? |
A simple phone timer. |
|
@pikurasa I have tested the changes and it's varying from |
901de5c to
83f797c
Compare
|
✅ All Jest tests passed! This PR is ready to merge. |
1 similar comment
|
✅ All Jest tests passed! This PR is ready to merge. |
|
@pikurasa I have fixed the loading text issue. |
|
@walterbender I guess, this PR is ready to be merged. Will create a new ticket for DOM improvements and will raise PRs in that. Please let me know if I need to change something. |
|
@walterbender Is there any feedback on this PR? |
03c48da to
688bb92
Compare
|
✅ All Jest tests passed! This PR is ready to merge. |
|
This seems to really help with loading times. I need to do some more testing, but all-in-all, big improvement. Thx. |
|
I tested it, and it works. As for performance, it seems to improve load time by a second, at least for running it locally. (I wish I had a more robust way to test this for you...) |
|
@walterbender @pikurasa Thank you! I'll perform more tests while working on the DOM issue as both of these issues are closely related. Also, this PR has addressed the issues that were needed to be resolved before working on the DOM issue. |





fixes: #4305
This PR fixes the slow loading of Music Blocks.
(Draft)
This PR will contain comparatively bigger changes. So I'll keep on adding commits here to describe what they do.
Current Stats
Total loading time -
~ 16.0 secondscc @walterbender @pikurasa
Changes
82bf4ca formats the index.html file as it was not formatted properly.
4ffa134 add header links in optimized order to efficient loading
10723b3 fixes the
render-blockingissue and bring thecumulative-layout-shiftscore from0.20to0.075084cf7 implements
http-serverreplacing theSimpleHTTPServer. UpgradesHTTPfrom1.0to1.1withKeep-Aliveenablede6ad80f reduces
Largest Contentful Paint elementfrom4,297 msto2,400 ms