The Superpower of ASTs: How We Saved 16% on Our Bundle Size

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2025
November 17 - 20, 2025
New York, US & Online
See JS stars in the US biggest planetarium
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation US 2025
JSNation US 2025
November 17 - 20, 2025. New York, US & Online
Learn more
Bookmark
Slides
Rate this content

Discover the untapped potential of Abstract Syntax Trees (ASTs) in this transformative session. Learn how we achieved a remarkable 16% reduction in our bundle size by inlining constant objects directly into the referencing code, eliminating the need for large files in the output. This method even outperforms Terser's tree shaking used by Webpack.

We will cover:

* Introduction to ASTs: What they are and why they’re invaluable.
* Overcoming AST Challenges: How to navigate the difficulties of working with ASTs.
* Best Practices: Proven techniques for effective AST utilization.
* Avoiding Pitfalls: A secret tip to prevent common mistakes.

ASTs are everywhere, and their applications are vast. This session will empower you with the knowledge and confidence to transform your code, revealing when and how to use ASTs for remarkable results.

Join me for an inspiring journey into the world of ASTs and unlock their potential to revolutionize your coding practices!

This talk has been presented at React Day Berlin 2024, check out the latest edition of this React Conference.

FAQ

Omri Lavi discusses how to reduce bundle size for front-end developers using a super tool that leverages ASTs (Abstract Syntax Trees) to optimize code without changing a single line of code.

The super tool can improve performance by 16% more than Terza's tree shaking, which is considered the state-of-the-art for bundle optimization.

The tool helps reduce the bundle size of Monday.com's complex client code by removing unnecessary constant file references and inlining actual values, which helps save each kilobyte in a large-scale application with over 300 developers and millions of users.

Tree Shaking didn't work properly because it doesn't handle objects well, leading to many unused constants files being included in the bundle, which increased the bundle size and memory footprint.

ASTs, or Abstract Syntax Trees, are data structures used to represent code. They are used by tools like ESLint, Prettier, and Webpack to read and transform code programmatically, allowing for optimizations like removing unused code.

Monday.com chose Babel for code manipulation because it is popular, flexible, and pluggable, allowing integration into their existing ecosystem without major changes.

Exec tests are a type of integration test where the input is code that is transformed with a plugin, and the output is executed to ensure the plugin updated the code correctly. They are important for verifying that AST-based plugins work as intended and do not introduce bugs.

Best practices include guarding assumptions by throwing errors for unhandled cases, writing exec tests for new scenarios, and following a development lifecycle that includes implementing solutions, guarding assumptions, and ensuring test coverage.

Omri Lavi emphasizes that ASTs are a superpower and should be considered for solving impossible challenges in code optimization, and developers should use the AST development lifecycle to maximize their impact.

Omri Lavi
Omri Lavi
20 min
16 Dec, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Our story is about a super tool that reduces bundle size without changing code. It removes input statements, improves performance, and reduces bundle size. ASTs are used to optimize constant files by removing references and replacing with values. Bubble is a tool for code manipulation using ASTs. Manipulating code with Bubble paths allows for removing unnecessary variable declarations. Careful handling and testing are necessary when using AST tools. Guarding assumptions and writing exec tests are key practices. Completing the AST development lifecycle ensures correct code updates. ASTs are a powerful tool for software development.

1. Introduction to Bundle Optimization

Short description:

Our story is about a super tool we used to reduce the bundle size without changing any code. It automatically removes 4,250 input statements, improves performance by 16%, and reduces the bundle size by 14 megabytes. As a tech lead at Monday's DevTools group, I build tools for developers to work with higher velocity and confidence. We have a large and complex client code, with over 300 developers and millions of users, so reducing the bundle size is crucial.

♪♪ ♪♪ ♪♪ Take a moment to think what this means to you. So you're probably thinking that this is a bundle, but you're most likely thinking that this is painful, because we, as front-end developers, spend a lot of time and effort on reducing it as much as possible. Our story is about a super tool we used to reduce the bundle size, and it took us from here to there without changing one line of code. What if you, too, could have a super tool that would automatically remove 4,250 input statements while improving your performance by 16% more than Terza's tree shaking, which is considered the state of the art regarding to bundle optimization? Also, it will reduce 14 megabytes from your bundle size, which is really a lot. Hi, I'm Omri Lavi. I'm a tech lead at Monday's DevTools group. This means I'm building tools for developers so they can work with higher velocity and with higher confidence. I'm also part of the Foundations group, so this gives me unique opportunities to work on some really interesting stuff like the one I'll talk about today. To give you some background, at Monday.com, we have a large and complex client code. We have more than 300 developers changing the client code on a daily basis, and we have millions of users, so each kilobyte we save matters a lot. This is why we look for innovative ways to reduce the bundle size as much as possible.

2. Optimizing Constants Files with ASTs

Short description:

We noticed a pattern with constant files that only contained strings and were referenced for one or two values. Tree Shaking didn't work well for objects, resulting in unnecessary JavaScript in our bundle. This increased bundle size, network load, and memory footprint. To solve this, we used ASTs to remove references, replace with actual values, and eliminate imports. ASTs are abstract syntax trees used to represent code. Tools like AST Explorer help visualize and manipulate code programmatically.

And a while ago, we noticed the following pattern. We saw that we have many files that look like this. They exported nested objects that in the end of the day only contained strings. This is why we call them constants files.

And the files that referenced the constants files only used one or two values out of these constants. So you're probably thinking to yourself, okay, I have Tree Shaking exactly for this case, and if you're unfamiliar with Tree Shaking, then it's a very common algorithm that most bundlers use today to remove the unused values from your bundle, so you'll end up exactly with what you need in your bundle. But in our case, Tree Shaking didn't work properly because we used objects, and Tree Shaking doesn't take care well with objects. So we ended up with something like this in our bundle, and you see that all the red parts are actually constants files.

And the problem with that is that we have many constants files inside our bundle. This means we have more JavaScript than what we actually needed. This increased our bundle's size and made it more network-heavy, so our application became heavier to load. Additionally, all of these files were kept in memory and were never removed, so it increased our memory footprint more than what we wanted. And it felt a lot like this. We had a small piece of code that carried a huge luggage with it.

So we had a dream. We had a dream that while we're building the bundle, we'll find the reference values out of the constants files, remove the references, and replace them with the actual values, and then we can remove the import for these constants files and end up exactly with the values that we need inside our bundle. So we knew what we wanted to do, but we weren't sure how to do it. We knew that we wanted to avoid major refactors because we had a lot of code that needed to be updated, and we knew we wanted to avoid manual update of the code because, again, it was a lot of code, and we needed to do it programmatically to avoid errors that humans can do. So after some thinking, we understood we can use ASTs, but wait, ASTs aren't too common, right? Think for a moment if you've ever used ASTs before.

So the truth is that we all use ASTs, and we just may not know it, and we'll see it in a second. So ASTs are abstract syntax trees. It's a data structure used to represent a piece of code, and the best way to understand it is by a tool called AST Explorer. AST Explorer is a free online tool, and you can put a piece of code in it, like the one here, and it will show you its AST. It may seem scary on the first glance. It really is, but the power of AST Explorer is that you can select a piece of code, and it will show you its matching node in the AST. So for example, you can see here we have a string literal node with the value of hey, Berlin. We can also select this part here to see it's a variable declaration node with the name of hi, the value of hey, Berlin, and we can also see its kind is a const. It's important to understand that ASTs really everyone. Many tools use AST. If you think of ESLint, PostCSS, Prettier, Webpack, and many other tools, they all use AST to read and transform code programmatically.

3. Using ASTs with Bubble for Code Manipulation

Short description:

Prettier uses AST to update code, allowing powerful transformations. We chose Bubble, a popular and flexible tool for code manipulation. Bubble reads and parses code into AST, runs plugins to generate new AST, and converts it back into code. Our Bubble plugin found reference identifiers from constants files, inlined the values, and removed unnecessary code. To illustrate this approach, we'll build a plugin that updates code during build time.

Let's take, for example, how Prettier is working. Let's say I have this piece of code that uses single quotes, and when I save the file, then Prettier runs behind the scenes and updates the file and updates the code to be like this. The result is that it has double quotes. And the way it's working behind the scenes is that it has this piece of code that says if you're seeing a string node with a quote type of single, then set its quote type to be double. And this part here is actually AST code. This is the magic and the engine behind Prettier that allows it to be so powerful.

So we knew we needed ASTs, but which tool, which framework should we use? We knew we needed something that will allow us to manipulate code using ASTs. We wanted the tool to be popular, so we'll be able to enjoy the community it comes with. We wanted it to be flexible, so it will allow us to do exactly what we want. And lastly, we wanted it to be pluggable, so we'll be able to use it in our existing ecosystem without making any major changes. So after some research, we decided to use Bubble. And Bubble has all of these characteristics, and you may recognize it from your web configuration, where it's very popular.

Bubble knows how to read code, parse it into AST, then it can run plugins to generate new AST out of it. This is where you can step in and write your own plugin that will go over nodes, mutate them, insert new ones, or remove existing ones, and then Bubble will take the new AST and create new code out of it. So now that we understand how Bubble works, let's get back to our original problem. After some work, we had a working Bubble plugin implementation, and it worked something like this. First, it found all of the reference identifiers. All of these identifiers are references for identifiers, for example, variables or functions and stuff like that. Out of these references, we found those that are coming from constants files. Then we calculated which exact values are being referenced, inline them instead of the references, and then we could remove the input statements along with the files, the constants files, to end up exactly with the code that we need.

This sounds very simple, right? What can go wrong with such implementation? The best way to understand it is by implementing something ourselves. Let's build a mini plugin that does something very similar. Let's say I want to handle this case where I'm declaring some variable and then directly export it. But instead of declaring the variable, I want to directly export the value. So I want to write a plugin that will automatically update the code from the top to be like the one from the bottom, and all of this during the build time. So let's build it together. This will be our input code, and we'll write the Bubble plugin itself. And it will look something like this. And it seems very scary, but we'll go over it line by line.

4. Manipulating Code with Bubble Paths

Short description:

Bubble allows you to use paths and specific types of paths as you require them. By accessing the name, scope, binding, and initialization of referenced identifiers, we can manipulate code and remove unnecessary variable declarations. This approach may seem like magic, but it has limitations. Changing the initialization can lead to unexpected output.

And it seems very scary, but we'll go over it line by line. The first thing I want you to understand is that Bubble allows you to use paths, and paths can be thought of as nodes inside the AST. But the power of Bubble is that you don't get just any path. You get specific types of paths as you require them. So for example, we can ask Bubble to give us all of the referenced identifiers, which are the types of nodes that we needed as I showed you before. So our path, for example, would be the greetings reference here.

Now that we have it, we can access its name, that is the actual string greetings. And the next thing we can do is that we can access the scope that is used inside the reference, meaning the actual lexical scope that is marked here on the right. Then we can query the scope. What is the binding for greetings, meaning what greetings actually references to. So we'll have this variable here.

We need to handle the case where the binding doesn't exist. For example, it may happen if we're having a global reference. For example, if we're using a console log, then console isn't declared anywhere in the lexical scope. So in this case, we'll exit early. Next, we can access the variable declaration and ask what it's being initialized to. So in this case, it will be this string literal here. So once we have the actual initial value in our hands, we can access our original reference again and replace it with the value that we just found. And it will look like this. Now there's no longer any need for our original variable declaration since it's entirely unused. So we can access the binding and tell it to remove itself. And we'll end up with this, which is exactly what we wanted.

This feels like magic, right? We wrote a few lines of codes and we changed drastically how the code behaves. So you're probably thinking, why is it not more common? Why am I not seeing more AST codes anywhere? And the best way to understand it is by playing a short game. So let's play a round of games of guess the output. Let's say I change my code. And instead of declaring a variable that is initialized to a string, I'm now initializing it to be an object. And then I deconstruct the object and export one of these properties. So if you think what we wanted the output for this case to be, we wanted it to be the same output as before, but we won't get this. Instead, we'll have this output.

5. Super Tools and Super Bugs

Short description:

Changing the initialization can lead to unexpected bugs. AST tools require careful handling due to the complexities of code input. We have learned from our experiences and developed best practices, focusing on guarding assumptions and writing exact tests.

And this is a major bug because it changed drastically how the code behaves. Instead of exporting a string, we're exporting an object. For sure, it will cause us bugs. So let's understand what happened here.

When our plugin runs, it finds this reference identifier, which according to our code is being initialized to this value here, that is the object itself. So we inline this value instead of the reference, and we'll end up with this code. And so far, so good. Nothing really changed. It will work the same way. But on the next phase of our plugin, it will find this reference identifier, and according to our code, it's being initialized to this value.

So we'll inline the reference with the object, and we'll end up with this code that is entirely not what we intended. And cases like this taught us that super tools come with super bugs. And the reason for it is that regular code has some user input that you run some logic on top of it to end up with your output. But in the case of AST tools, you don't have user input. Instead, you have code input. And code input is very hard to work with. It's less structured. It has many edge cases, and you need to learn how to use it properly.

In many ways, it reminds Regexes. We all used Regexes before, and we saw how simple cases become very complicated very quickly. And you need to learn how to work with Regexes properly to avoid the pitfalls. So with time, we learned how to work with AST tools, and we defined our own best practices, and we wanted to share them with you today. I have dozens of tips, but this talk is very short. So we'll focus on two things. First is to guard your assumptions. And the second is to write exact tests. So when you develop AST tools, you can take nothing for granted, even if you're using AST Explorer.

You're guaranteed to meet new JavaScript features, which is very exciting by itself, but it's less exciting if it's due to a bug in production. So what we'd like to do is to guard our assumptions. So, for instance, in our mini plugin that we just wrote, we knew that it worked perfectly for string bindings.

6. Guarding Assumptions and Exec Tests

Short description:

When making assumptions, it's important to question them. Throwing errors during build time helps catch unsupported initializations. The fail fast principle encourages failing early to prevent bugs in production. Integration tests, specifically exec tests, are crucial for ensuring the entire solution works as intended.

We checked it through and through, and it worked perfectly. And we thought it would be okay. What can go wrong? But I had an assumption here that we're always bound to strings. When I make such assumptions, I should always question them.

So, for example, if we have this code, meaning we have a variable initialization that is not bound to string, but to an object, then in this case, we'd like to have a nice error during the build time that's saying, look, you're using an unsupported initialization. Here's the file. Here is the line. Please deal with it.

And the way we can get these errors is different between the various frameworks. But generally speaking, it looks something like this. If you're seeing an initialization node that isn't a string literal, then throw an error. But you don't throw just any error. In the case of Babel, for example, you throw a code frame error, which gives you all the context that you need, the location of the problematic node, along with the file, the line, the column, and everything, along with any detail that you'd like to add.

And it's maybe annoying to get such errors during the build time, but it's much better than a bug in production. It also follows the fail fast principle that says that you should fail as soon as possible instead of later on. And lastly, it allows an incremental approach where you're adding more and more layers as you find more cases that you need to take care of. So remember, when you're uncertain, just throw.

So throwing errors allows you incremental growth. But how do you know that the code even works in the first place? We all know that we need to write the right types of tests. We need to write unit tests, we all agree on that, but it's not enough. We need to write at least integration tests to make sure that the entire solution is working as a whole.

So we needed integration tests, but for AST toolings that have some very specific requirements. So after some research, we learned about exec tests. And exec tests look like this. It may seem scary, but when you look again, it's just like a regular test. It has the it part on the top, it has some inputs. Then you do something in the middle, you run something to get some output. And then you can make assertions on the output to make sure that the code is actually working as it should. But the input is actually code. And what you do with it is that you transform it using the plugin that you test to end up with the updated code.

7. Completing the AST Development Lifecycle

Short description:

By running updated code and making assertions on its output, you can ensure that your plugin updates the code correctly. Exec tests are powerful in finding and preventing bugs. By implementing solutions, guarding assumptions, and writing exec tests, you can complete the AST development lifecycle and handle all cases properly. ASTs are a superpower and should be considered when facing challenges. Maximize your impact by using the AST dev lifecycle.

And then this is the magical part. You run the updated code to get its output. And then you can make assertions on the output of the updated code. So you'll know that your plugin updated the code exactly in the way you meant it to update it. So you know it didn't introduce any weird behaviors that you didn't mean to. And exec tests are very powerful. And for us, it found many bugs and prevented many bugs.

And in the end of the day, it saved a lot of time. By following these principles, we developed our own healthy AST development lifecycle. And this is the important part. First, you start by implementing the solution for all the known cases that you found using AST Explore. Then you guard your assumptions by throwing meaningful errors for the cases that aren't handled properly. Then you run your plugin to discover the unknown cases and by meeting these meaningful errors. Then you write exec tests for the new cases that you found, like the one I showed you before. Then you implement the solutions and ensure that the tests pass so you'll know that the cycle is complete and all of the cases are handled properly.

So by following these methods, we're able to deliver super impact. But most importantly, we have a new super tool in our belt and hopefully, so do you. Our key takeaways here is that ASTs are a superpower. If you're meeting an impossible challenge, think about ASTs as one of the tools you can use to solve them. And lastly, when you do, use the AST dev lifecycle to maximize your impact. Thank you.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced 2022React Advanced 2022
25 min
A Guide to React Rendering Behavior
Top Content
This transcription provides a brief guide to React rendering behavior. It explains the process of rendering, comparing new and old elements, and the importance of pure rendering without side effects. It also covers topics such as batching and double rendering, optimizing rendering and using context and Redux in React. Overall, it offers valuable insights for developers looking to understand and optimize React rendering.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
Watch video: React Concurrency, Explained
React 18's concurrent rendering, specifically the useTransition hook, optimizes app performance by allowing non-urgent updates to be processed without freezing the UI. However, there are drawbacks such as longer processing time for non-urgent updates and increased CPU usage. The useTransition hook works similarly to throttling or bouncing, making it useful for addressing performance issues caused by multiple small components. Libraries like React Query may require the use of alternative APIs to handle urgent and non-urgent updates effectively.
How React Compiler Performs on Real Code
React Advanced 2024React Advanced 2024
31 min
How React Compiler Performs on Real Code
Top Content
I'm Nadia, a developer experienced in performance, re-renders, and React. The React team released the React compiler, which eliminates the need for memoization. The compiler optimizes code by automatically memoizing components, props, and hook dependencies. It shows promise in managing changing references and improving performance. Real app testing and synthetic examples have been used to evaluate its effectiveness. The impact on initial load performance is minimal, but further investigation is needed for interactions performance. The React query library simplifies data fetching and caching. The compiler has limitations and may not catch every re-render, especially with external libraries. Enabling the compiler can improve performance but manual memorization is still necessary for optimal results. There are risks of overreliance and messy code, but the compiler can be used file by file or folder by folder with thorough testing. Practice makes incredible cats. Thank you, Nadia!
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Today's Talk discusses the future of performance tooling, focusing on user-centric, actionable, and contextual approaches. The introduction highlights Adi Osmani's expertise in performance tools and his passion for DevTools features. The Talk explores the integration of user flows into DevTools and Lighthouse, enabling performance measurement and optimization. It also showcases the import/export feature for user flows and the collaboration potential with Lighthouse. The Talk further delves into the use of flows with other tools like web page test and Cypress, offering cross-browser testing capabilities. The actionable aspect emphasizes the importance of metrics like Interaction to Next Paint and Total Blocking Time, as well as the improvements in Lighthouse and performance debugging tools. Lastly, the Talk emphasizes the iterative nature of performance improvement and the user-centric, actionable, and contextual future of performance tooling.
Optimizing HTML5 Games: 10 Years of Learnings
JS GameDev Summit 2022JS GameDev Summit 2022
33 min
Optimizing HTML5 Games: 10 Years of Learnings
Top Content
Watch video: Optimizing HTML5 Games: 10 Years of Learnings
PlayCanvas is an open-source game engine used by game developers worldwide. Optimization is crucial for HTML5 games, focusing on load times and frame rate. Texture and mesh optimization can significantly reduce download sizes. GLTF and GLB formats offer smaller file sizes and faster parsing times. Compressing game resources and using efficient file formats can improve load times. Framerate optimization and resolution scaling are important for better performance. Managing draw calls and using batching techniques can optimize performance. Browser DevTools, such as Chrome and Firefox, are useful for debugging and profiling. Detecting device performance and optimizing based on specific devices can improve game performance. Apple is making progress with WebGPU implementation. HTML5 games can be shipped to the App Store using Cordova.

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
Workshop
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
React Performance Debugging
React Advanced 2023React Advanced 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.
Maximize App Performance by Optimizing Web Fonts
Vue.js London 2023Vue.js London 2023
49 min
Maximize App Performance by Optimizing Web Fonts
WorkshopFree
Lazar Nikolov
Lazar Nikolov
You've just landed on a web page and you try to click a certain element, but just before you do, an ad loads on top of it and you end up clicking that thing instead.
That…that’s a layout shift. Everyone, developers and users alike, know that layout shifts are bad. And the later they happen, the more disruptive they are to users. In this workshop we're going to look into how web fonts cause layout shifts and explore a few strategies of loading web fonts without causing big layout shifts.
Table of Contents:What’s CLS and how it’s calculated?How fonts can cause CLS?Font loading strategies for minimizing CLSRecap and conclusion