# Winning the Performance Race

- Speaker: [Gil Eckstein](/wiki/speakers/gil-eckstein.md)
- Event: [Reversim Summit 2024](/wiki/years/2024.md)
- Video: https://www.youtube.com/watch?v=SKyHuxl92ZQ
- Transcript: [/transcripts/2024/17-SKyHuxl92ZQ.md](/transcripts/2024/17-SKyHuxl92ZQ.md)
- Language: Hebrew · Type: talk · Level: advanced
- Topics: [Frontend](/wiki/topics/frontend.md), [Performance](/wiki/topics/performance.md), [Architecture](/wiki/topics/architecture.md), [JavaScript](/wiki/topics/javascript.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares strategies and lessons learned from improving the performance of millions of large-scale web applications. The main argument is that achieving high performance at scale requires systematically reducing client-side JavaScript bundle sizes and properly managing module loading and initialization. The audience learns how to split monolithic UI components, leverage server-side rendering for heavy calculations, and apply Inversion of Control patterns to handle complex dependencies.

## Key points

- [1:13](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=73s) The speaker introduces Core Web Vitals as a standard metric used by Google and competitors to measure and improve user experience across platforms.
- [3:42](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=222s) JavaScript is highlighted as the heaviest resource in web applications, affecting both network and CPU performance.
- [4:48](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=288s) A detailed code example of a button component demonstrates how unused code and heavy logic frequently bloat client-side bundles.
- [9:07](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=547s) The first solution involves splitting monolithic components and moving heavy logic and props calculation to a server-side environment.
- [13:21](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=801s) Alternative methods such as React Server Components, Suspense, and specialized frameworks can also help minimize client-side JavaScript.
- [17:42](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=1062s) The speaker transitions to discussing module loading strategies and initialization bottlenecks in complex enterprise applications.
- [25:43](https://www.youtube.com/watch?v=SKyHuxl92ZQ&t=1543s) An Inversion of Control pattern combined with asynchronous module loaders is introduced to solve dependency management and parallel execution issues.

## Takeaways

- Move heavy data calculations and unused rendering logic from the client to a front-end server or BFF layer.
- Split large UI components into smaller, dynamic modules to ensure users only download the code they actually need.
- Use an Inversion of Control pattern to decouple module dependencies and enable efficient parallel initialization.

## Questions this talk answers

- How can I reduce my React application's JavaScript bundle size when using complex UI components with many conditional variants?
- What is the best way to handle asynchronous initialization and dependencies between multiple large frontend modules?
- How do server-side rendering and Server Components impact client-side performance and hydration?

## Technologies

JavaScript, Node.js, React, Next.js

## Tags

architecture, bundle size, frontend performance, javascript optimization, react, server side rendering
