TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Performant Front-End Architecture

305 pointsby mostlystaticover 5 years ago

15 comments

robgibbonsover 5 years ago
Not to be too negative, but I&#x27;m seeing a lot of purely anecdotal comments on HN with lots of fuzzy gut feelings and very little to back up what seemingly amounts to elitism against JavaScript.<p>It&#x27;s very easy to write fast JavaScript, with React or pick-your-framework. I would argue that these frameworks go out of their way to help you do that. But carelessly throwing modules at your problem is not going to get you that.<p>There are many reasons why SPAs can be slow. Whether that is due to truly lazy developers, overly tight deadlines, or management that just doesn&#x27;t care is often left out of these discussions.<p>Everyone likes to complain about SPAs, as if terrible load times are a fundamental trait of frontend frameworks. That is not at all the case.
评论 #22296703 未加载
评论 #22296660 未加载
评论 #22345696 未加载
评论 #22297704 未加载
评论 #22298427 未加载
neyaover 5 years ago
How to optimise front end apps? Don&#x27;t use pure javascript based frontend. Do all normal crud apps on regular server side code. Eg. A normal rails CRUD app is much faster even with the intermediate page loads factored in, than a heavy react app with a spinner to make it appear fast. Want to give the feel of a JS app? Use turbolinks. Really want to use something fancy and dynamically update your content from the server? Use something like Phonix Liveview. I love VueJS and React. But these days I&#x27;ve switched to using Liveview so much that I don&#x27;t miss them at all. The benefits are also huge. Near instant updates with very little server load (scalable) and ultra-light frontend. Win win win.
评论 #22299223 未加载
jmeyer2kover 5 years ago
Front-end performance optimization is surprisingly lacking when it comes to web apps. We focus so much on shaving off 50 ms when it comes to server response time, but we&#x27;re fine with a 7 second load time for front-end. It&#x27;s very surprising that there isn&#x27;t as much focus on front-end architecture performance.
评论 #22294869 未加载
评论 #22294862 未加载
评论 #22294440 未加载
评论 #22296145 未加载
评论 #22294324 未加载
评论 #22294537 未加载
评论 #22297964 未加载
corentin88over 5 years ago
&gt; In practice you&#x27;ll rarely be able to optimize on all fronts. Find out what&#x27;s having the biggest impact on your users and focus on that.<p>Can’t agree more. If your engineering team spent several sprints to focus on improving the app load time, it has to be something highly impactful on your conversion rate. Otherwise it’s just a waste of resources.
评论 #22294703 未加载
评论 #22294231 未加载
评论 #22294115 未加载
nojvekover 5 years ago
I spent the last 6 months optimizing front end performance at my last workplace.<p>What I can say is measure before just blindly following a checklist.<p>Chrome devtools performance and audit tools are awesome.<p>Measure, fix biggest bottleneck, repeat.<p>This post has some great recommendations but things could be simpler. Like use http cache headers instead of service workers. They help both the cdn and the browser. Use immutable urls for assets.<p>The best way to improve perf is to simply load less JS and CSS. Less is more. It’s not always possible but helps trim down large swaths of network load when you can keep things simple.
lbjover 5 years ago
What a goldmine. We should put together an endless checklist of best practices for all parts of webdevelopment.<p>So many apps are lacking, so many built on outdated&#x2F;inferior tech. Currently there&#x27;s just too much knowledge to consume.
评论 #22294217 未加载
评论 #22294169 未加载
评论 #22294164 未加载
评论 #22294179 未加载
ficklepickleover 5 years ago
I&#x27;m surprised I haven&#x27;t seen nuxt (an SSR framework for Vue.js) mentioned here. It makes many of these performance enhancements out of the box.<p>It enables some cool options, like pre-rendering static content with the generate flag. You can use it as a static site generator, or wrap dynamic stuff in a &lt;client-only&gt; component and only that portion will be rendered client-side.<p>Service workers &amp; PWA stuff, code splitting and dynamic routes, its all made pretty easy.<p>I&#x27;ve been finding it quite easy to build performant front-ends with nuxt. It is opinionated, and it abstracts away the webpack config, so it certainly isn&#x27;t perfect for everything. But for me, it has really been hitting a sweet spot.
musicaleover 5 years ago
I greatly dislike the use of &quot;performant&quot; as an adjective.<p>The first sentence uses &quot;fast and user-friendly&quot; which is much clearer.
评论 #22294943 未加载
drejover 5 years ago
My favourite performance advice, regardless of context: just do less stuff.<p>In this case - load fewer and&#x2F;or smaller resources.
评论 #22298679 未加载
jupp0rover 5 years ago
“Establishing a new server connection usually takes 3 round trips between the browser a server:<p>DNS lookup<p>Establishing a TCP connection<p>Establishing an SSL connection”<p>This takes more than three roundtrips and I wish the author would have mentioned 0-RTT options in quic and TLS 1.3
4ec0755f5522over 5 years ago
I don&#x27;t know what&#x2F;how Fastmail does it but their front end is amazing. So fast. I assumed their name was about speedy delivery but the whole UX is the fastest I&#x27;ve ever seen.
Kiroover 5 years ago
&gt; The service worker below caches the HTML and CSS that&#x27;s needed to render the page.<p>Why would you need a service worker for this? Doesn&#x27;t the regular browser cache achieve the same thing?
评论 #22296838 未加载
评论 #22297081 未加载
jdmg94over 5 years ago
last year the React team presented a pattern called fetch on render, combined with proper code-splitting, I see this as a win-win for webapps
评论 #22295834 未加载
tylerjwilk00over 5 years ago
Modern front-end architecture has &quot;fixed&quot; the 1 second page load and replaced it with a 0.5 second page load... And a 3 second spinner... And a 1 second spinner... And a 4 second progress bar... But hey the TTFB is under 1s now!
评论 #22295389 未加载
Supermanchoover 5 years ago
5 second page load is fine. This endless tuning is a great analytical puzzle, but implementing a new feature trumps these complex micro-optimizations that the consumer less and less about, with mobile having already become the common case access (mobile access is already going to be slow from network anyway). It&#x27;s rare that you get a complaint. Once it&#x27;s loaded and you have cached as much as possible, you&#x27;re fine for returning customers which matter more to appease.
评论 #22295616 未加载
评论 #22296077 未加载
评论 #22296286 未加载
评论 #22296843 未加载