Tagged articles
FastThreadLocal
13 articles · Page 1 of 1
FastThreadLocal, Netty’s custom thread‑local implementation, replaces JDK’s ThreadLocal by using an indexed array to avoid hash collisions, offering faster access; this article explains its background, core classes, source‑code mechanics, performance trade‑offs, and cleanup strategies within Netty’s architecture.
FastThreadLocalJavaNetty
0 likes · 13 min read

This article examines the design of Netty's FastThreadLocal, compares its performance and memory‑management advantages over Java's ThreadLocal, and outlines suitable high‑concurrency use cases, implementation details, and practical considerations for developers.
ConcurrencyFastThreadLocalJava
0 likes · 13 min read

This article explains why Netty introduces FastThreadLocal instead of relying on JDK ThreadLocal, detailing its background, core principles, source code structure—including InternalThreadLocalMap, FastThreadLocalThread, and FastThreadLocal implementations—performance implications, resource reclamation mechanisms, and practical usage within Netty’s memory allocation.
FastThreadLocalMemory ManagementNetty
0 likes · 11 min read

This article explains the internal workings of Java's ThreadLocal and Netty's FastThreadLocal, compares their memory management and lookup mechanisms, provides code examples, and offers guidance on when to choose each for high‑concurrency backend applications.
ConcurrencyFastThreadLocalJava
0 likes · 7 min read

This article explains the motivation behind Netty's FastThreadLocal, details its internal design using an indexed array to avoid hash collisions, analyzes the core source code of InternalThreadLocalMap, FastThreadLocalThread, and FastThreadLocal, and discusses performance implications and reclamation strategies.
ConcurrencyFastThreadLocalJava
0 likes · 10 min read

This article compares Java's standard ThreadLocal with Netty's FastThreadLocal, explains their internal mechanisms, shows practical code examples, runs a JMH microbenchmark, and discusses performance, memory management, and usage scenarios to help developers choose the right thread‑local storage solution.
ConcurrencyFastThreadLocalJMH
0 likes · 11 min read

The article traces a production bug where unreleased JDK ThreadLocal data corrupted user info, then compares JDK ThreadLocal with Netty’s FastThreadLocal, detailing their source‑code implementations, performance trade‑offs (O(n) vs O(1) access), memory‑leak risks, and recommends explicit remove() calls to avoid leaks.
FastThreadLocalJavaMemory Management
0 likes · 15 min read

The article compares JDK ThreadLocal and Netty FastThreadLocal, detailing their implementations, performance trade‑offs, and memory‑leak risks, illustrates a real‑world HTTPS bug caused by missing remove() calls, and recommends always cleaning up ThreadLocal values while noting FastThreadLocal’s O(1) access may not always outperform the JDK version.
ConcurrencyFastThreadLocalJava
0 likes · 17 min read

This article explains why Netty created FastThreadLocal, describes its internal design and source‑code analysis—including UnpaddedInternalThreadLocalMap, InternalThreadLocalMap, FastThreadLocalThread, and FastThreadLocal implementations—covers performance degradation in ordinary threads, outlines its three resource‑recycling mechanisms, and shows how it is used for ByteBuf allocation in Netty.
FastThreadLocalNettyThreadLocal
0 likes · 14 min read

This article explains why Netty implements FastThreadLocal instead of using JDK ThreadLocal, describes its array‑based design, internal classes such as InternalThreadLocalMap and FastThreadLocalThread, walks through the get() and initialization logic, discusses cleanup mechanisms, performance degradation on ordinary threads, and shows its practical use for ByteBuf allocation in Netty.
FastThreadLocalNetty
0 likes · 12 min read

This article explains the motivation behind Netty's FastThreadLocal, compares it with JDK ThreadLocal, details its internal implementation—including InternalThreadLocalMap, FastThreadLocalThread, and key methods like get()—and discusses its performance benefits, resource recycling mechanisms, and practical usage in Netty's ByteBuf allocation.
FastThreadLocalJavaMemory Management
0 likes · 13 min read

This article explains why Netty introduced FastThreadLocal, how it avoids the hash‑collision overhead of JDK ThreadLocal by using an indexed array, details the core classes and methods involved, and describes the three cleanup mechanisms and its practical use in Netty's ByteBuf allocation.
ConcurrencyFastThreadLocalJava
0 likes · 10 min read

This article dissects Netty's custom FastThreadLocal and FastThreadLocalThread implementations, showing how they replace JDK ThreadLocal with constant‑time indexed access, padding to avoid false sharing, and customizable initialization and cleanup to boost backend concurrency performance.
ConcurrencyFastThreadLocalNetty
0 likes · 16 min read
