Tagged articles
__slots__
24 articles · Page 1 of 1
The article breaks down Python’s memory system layer by layer, explaining stack vs. heap, reference counting, generational garbage collection, the true effect of the del statement, built‑in optimizations like integer caching, string interning and __slots__, and shows how to process a 20 GB CSV efficiently with generators.
PythonReference Counting__slots__
0 likes · 12 min read

The article shows how to diagnose and dramatically cut Python’s memory usage by using built‑in tools such as sys.getsizeof, psutil, __slots__, generator expressions, memory‑mapped files (mmap) and string interning, providing concrete code examples, benchmarks and practical tips to avoid common pitfalls.
Python__slots__generator
0 likes · 15 min read

Learn five practical Python techniques—streaming large files, using generator pipelines, leveraging __slots__, avoiding temporary objects in loops, and reusing buffers—that together can reduce memory consumption by up to 70% and dramatically improve performance when processing gigabyte‑scale datasets.
Python__slots__generators
0 likes · 9 min read

The article walks through five concrete Python techniques—streaming file reads, generator expressions, __slots__, avoiding temporary objects in loops, and reusing buffers—showing code examples and measured memory reductions that together lowered overall RAM consumption by about 70%.
__slots__generatorsmemory optimization
0 likes · 9 min read

This article introduces essential Python dunder methods such as __missing__, __fspath__, __call__, __slots__, __enter__/__exit__, __aiter__/__anext__, __getattr__/__getattribute__, explaining their problem contexts, concrete implementations, performance benefits, and best‑practice trade‑offs with clear code examples.
__call____missing____slots__
0 likes · 17 min read

This article showcases six powerful yet often overlooked Python standard‑library features—pathlib, contextlib, __slots__, functools.lru_cache, generator pipelines, and dataclasses—demonstrating how they simplify code, boost performance, reduce memory usage, and make scripts more maintainable.
LRU cachePython__slots__
0 likes · 11 min read

This article explains how Python's __slots__ attribute can dramatically reduce memory usage and speed up attribute access when creating large numbers of objects, providing detailed examples, performance measurements, best‑practice guidelines, and practical use‑case scenarios.
Python__slots__attribute-access
0 likes · 8 min read

This article explains how Python's default class memory overhead can be dramatically reduced using the __slots__ magic attribute, providing detailed code examples, memory and speed benchmarks, practical use cases, limitations, and best‑practice recommendations for developers who need high‑performance, memory‑efficient objects.
Best PracticesPython__slots__
0 likes · 12 min read

This article explains the process of moving hash slots between nodes in a Redis cluster using the redis-cli --cluster reshard command, detailing the required parameters, interactive steps, and verification of successful slot migration.
ClusterRedisResharding
0 likes · 6 min read

This article demonstrates how to build a highly reusable, function‑based modal system in Vue 3 that supports lazy loading, prop passing, event binding, provide/inject data injection, custom slots, and method exposure, allowing developers to display any modal component with a single function call.
Functional ComponentProvide/InjectTypeScript
0 likes · 13 min read

This article provides a comprehensive guide to using JSX/TSX in Vue 3, covering project setup, the defineComponent API, option and function syntax, data binding, event handling, slots, scoped CSS, and various approaches to defining and simplifying props with TypeScript.
JSXScoped CSSTSX
0 likes · 22 min read

This article demonstrates how to create a reusable Vue 3 component with Vite and Element‑Plus, covering two‑way data binding via v‑model, slot forwarding using the h function, and exposing child component refs through a Proxy, complete with code examples and explanations.
@ComponentV-modelVue
0 likes · 7 min read

This article introduces Web Components—a W3C‑standardized technology supported by all major browsers—explaining its core concepts (Custom Elements, Shadow DOM, Templates, Slots), providing step‑by‑step code examples, discussing lifecycle callbacks, compatibility, polyfills, and how it compares with frameworks like React and Vue.
Frontend DevelopmentShadow DOM__slots__
0 likes · 22 min read

This article explains how to combine Vue 3.3 generic components and the new defineSlots feature to create a lightweight, column‑configurable wrapper around Element Plus's ElTable that provides full TypeScript type hints for row data and custom column slots, improving maintainability and developer experience.
ElTableGeneric ComponentTypeScript
0 likes · 18 min read

This article introduces Web Components, explains the three core technologies—custom elements, Shadow DOM, and templates with slots—provides detailed code examples for each, discusses lifecycle callbacks, demonstrates encapsulation benefits, and offers practical guidance on using them across modern front‑end frameworks.
Shadow DOM__slots__custom elements
0 likes · 12 min read

This article provides a comprehensive analysis of Vue.js slot mechanisms, covering normal slots, scoped slots, and the v-slot syntax, with detailed code examples and explanations of the underlying rendering functions and compilation processes.
Scoped SlotsVue.js__slots__
0 likes · 20 min read

This article presents a collection of practical Python techniques—including string cleaning with translation tables, iterator slicing with itertools, skipping file headers, keyword‑only arguments, custom context‑manager objects, memory‑saving __slots__, CPU and memory resource limits, export control via __all__, and simplified total ordering—illustrated with concise code examples.
PythonResource LimitsString Manipulation
0 likes · 9 min read

This article explains how Python's dynamic objects consume hidden memory, demonstrates measuring object sizes with sys.getsizeof and a recursive get_size function, and shows how using __slots__ can dramatically reduce memory footprints while discussing trade‑offs and practical code examples.
Python__slots__memory management
0 likes · 9 min read

This article explains how Redis Cluster distributes data across 16,384 hash slots, outlines its high performance, availability, and scaling advantages, and details key limitations such as client support, single‑database restriction, and multi‑key operation constraints with practical hash‑tag solutions.
ClusterMulti-Key__slots__
0 likes · 5 min read

This article explains the structure and operation of the JVM stack, including stack frames, local variable tables, operand stacks, slots, and common bytecode instructions, providing code examples and visual aids to help readers grasp how Java bytecode is executed on the stack.
Java__slots__operand-stack
0 likes · 13 min read

This article examines common mistakes when nesting Vue.js components—such as overly deep parent‑child structures and cumbersome event communication—and demonstrates how to streamline component design using reusable child components and the slot content‑distribution mechanism, complete with practical code examples and visual diagrams.
Component ArchitectureFrontend OptimizationVue.js
0 likes · 13 min read

This article explains how Redis Cluster automatically distributes data across nodes, how clients locate the correct node using slot hashing and hash tags, and how resharding and slot migration are performed without downtime, providing a detailed overview of the partitioning mechanism.
ClusterKey hashingPartitioning
0 likes · 10 min read

This guide explains how to reshard a Redis cluster by moving hash slots between nodes, detailing each command-line step, required inputs, and verification procedures to ensure balanced slot distribution across the cluster.
BackendRedis__slots__
0 likes · 4 min read

This article outlines five essential steps to avoid Java heap space errors in Hadoop MapReduce by estimating memory consumption, verifying JVM availability and settings, limiting swap usage, and configuring instance slot numbers below the JobTracker's calculated values, ensuring stable cluster performance.
HadoopJava HeapMapReduce
0 likes · 11 min read
