-
Notifications
You must be signed in to change notification settings - Fork 37
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
perf: minimize application preload payload #41
Comments
@zebateira - per our conversation, are you able to work with @cwaring and @jdiogopeixoto to get this and #34 resolved? As we discussed, we might also want to look into establishing some sort of ongoing instrumentation for the blog to keep an eye on performance as the blog continues to expand over time. Thank you! |
Note re instrumentation: @atopal recommends https://speedcurve.com/. |
@zebateira and @jdiogopeixoto - I've added #84 as a larger issue for adding ongoing performance instrumentation to the blog (as well as other IPFS websites). In the meantime, the high-level metrics on WebPageTest don't look as bad as I'd feared compared to the existing blog metrics, but are you able to look into these in closer detail to identify other areas of optimization? We can open a separate issue if that's easier. Thank you! cc @atopal, per his request. |
This is great 🙏 |
Progress report 1I'll continue next week, but I wanted to leave some of the progress I have so far: https://www.notion.so/protocollabs/Performance-issue-on-IPFS-Blog-74fae8476b3e413abdde7704a9170a02 The main issue that I have found is that the whole entire list of blog posts is downloaded on the homepage (but not in the blog post page) which includes the blog post parsed markdown data as well. You can read the details in the Notion page above and to understand how I reached that conclusion. |
👋🏻 hi folks, so I've investigated this a little further over the weekend and unfortunately it is related to a core component of how Vuepress 1.x bundles the application data. Essentially the frontmatter for every page is parsed and loaded into memory, designed this way to power the default theme search box, but as we're not using that functionality here it causing wasteful clientside overhead. Related issues:vuejs/vuepress#2689 Good news this is fixed in Vuepress 2.x, bad news this is still in alpha and some essential plugins that we depend on (such as vuepress-plugin-blog have not been upgraded yet. Next options, as I currently see them:
|
One additional note, when I originally evaluated these bundlers Vuepress was the only one I that I could get to work with relative path urls suitable for meeting the requirement of hosting on IPFS (using vuepress-plugin-ipfs). At the time we didn't have an origin domain proxy in IPFS |
We have discussed using nuxt on ipfs.io, as well as in separate discussion regarding the ecosystem directory being built by @orvn. Really reluctant to blow our timeline out to this degree but how lengthy would migrating this blog to nuxt be? @cwaring @jdiogopeixoto @zebateira, please weigh in here? |
@jessicaschilling you've said before that considering our current deadline goal for go-live and the fact that we are already in a position that the current new ipfs blog is already an improvement to the old one even considering this performance issue. I agree with going live with this issue, and then we can fix this either by moving to nuxt.js or upgrading to vuepress 3. |
Responding to @cwaring's analysis in #41 (comment):
Suggest that we rule out option 1 in favor of both of the following:
REQUEST FOR THE REST OF THE TEAM |
This sounds like a suitable approach. Vuepress is still going to be a useful tool in our arsenal for docs and simple sites, plus the benefits included in the upcoming v2.x will solve the main problem in this issue and speed up the entire build pipeline overall, so I don't see us moving away from it completely. Nuxt is a logical next step for more power and flexibility, however as @zebateira has mentioned we need to build a custom boilerplate that would make sense for us and commit more resources to maintaining our web properties. This is going to take time and effort to get right. I think the happy place is if we commit the effort to support both at PL, and design a common UI kit that can be shared across all Vue applications. This will be help our teams be productive and provide more value to the community looking to deploy IPFS friendly web-apps. p.s: |
Practically speaking we could also shave off some build time by removing any plugins that are not required by the blog. Please be aware that the backend slowness is a webpack v4 problem (which is doing all the bundling work under the hood) rather than a vuepress issue, and considering that Nuxt v2 is also running webpack v4 we may not gain a great deal in compile time by migrating across, we may have to wait for Nuxt v3 and incremental builds to ship. In that regard vuepress-next and vite are already ahead with solving some of these core problems. |
Agreed 👍
I wouldn't add this as a must to the task of starting ipfs.io replatform - it would help but we would have a lot more lessons to learn from the first usage of Nuxt.js and incorporate that into the boilerplate later. |
Regarding this @cwaring what do you suggest doing exactly? Using |
Sorry for being awfully quiet during this discussion. As I am relatively new to the Vue ecosystem I didn't feel like I had any valuable input. I did came across those issues that @cwaring mentioned about scalability when I was trying to find a solution for this, I should have mentioned them earlier. There's something that I tried that might be worth mentioning here. I tried to use the official blog theme (vuepress-theme-blog) with all our blog posts. After building it the biggest file I got was about 800 KB with the next one being about 70KB - a huge difference compared to our files. What I noticed is that in their main JS file all the content from the blog posts is truncated and in our main JS file we have all the content (that we don't really use). So before doing any webpack improvements I would suggest we try to do the same and see by how much it reduces our bundle size. |
Nice find @jdiogopeixoto, yes I suspect there is a lot more that can be done starting with a simple cleanup before messing with webpack - considering this is a temporary situation for a few months that is a fair compromise to get this project over the line. ✨ Also bonus tip✨ : the next vuepress is using esbuild which is like a rocket compared to webpack. Excited for this to land so we can upgrade all our apps! |
I've been messing around with the project trying to find the issue. I think I managed to solve it by removing some files and changing some things. I opened a PR (#91) with the changes. @cwaring @zebateira can you take a look at it? |
@jdiogopeixoto looking good! 🎉 |
Currently the blog index is loading over 5.2mb of JS which is blocking the site rendering for nearly 10s. This payload needs to be significantly reduced to meet performance standards and introduce async lazy loading for additional page meta.
related: #40 #30
The text was updated successfully, but these errors were encountered: