This article details a step‑by‑step performance tuning journey for a Java‑based SOA service, covering thread‑pool redesign, memory‑allocation adjustments, and JIT compilation tweaks that together lifted QPM by nearly 40% and overall system throughput by about 50%.
This article explains the bitmap concept, demonstrates how to store and query billions of integers using bitwise operations, introduces BitSet and Bloom Filter implementations, and provides practical Java code snippets for adding, removing, and checking elements while highlighting their memory‑saving advantages.
An in‑depth analysis shows why assigning a value at index 99999 in a large JavaScript array triggers V8 to switch from fast to slow (dictionary) mode, dramatically reducing memory usage by expanding capacity and converting holey arrays into a more efficient storage structure.
This article presents ten big‑data interview problems, each describing a scenario such as finding the most frequent IP, top‑K queries, word frequency counting under memory limits, and techniques like hashing, bitmap, trie, heap, and external sorting to solve them efficiently.
The article explains how PHP's default buffered queries can exhaust memory when processing large result sets and demonstrates using unbuffered query APIs with mysqli, PDO, and the old mysql extension to fetch rows incrementally, reducing memory consumption.
This article demonstrates how to reduce pandas DataFrame memory consumption by selecting appropriate column data types, downcasting numeric types, converting object columns to categorical, and specifying optimal dtypes during CSV import, using a 130‑year baseball dataset as a practical example.
By extending Flutter’s ImageCache to also store external texture data and using reference‑counted texture identifiers, the Xianyu app eliminates duplicate bitmap‑to‑texture conversions, dramatically lowers physical memory consumption and GC spikes on image‑heavy pages, though it requires invasive engine‑code modifications and ongoing maintenance.
This article explains the Tagged Pointer mechanism introduced in iOS 64‑bit environments, detailing how it reduces memory usage, speeds up object creation and method dispatch, and describing the underlying tag‑plus‑data representation, class registration, and pointer generation with code examples.
This article analyzes the challenges of large‑scale mobile and IoT push services, presents a real‑world Netty case study, and provides detailed design guidelines—including file‑descriptor tuning, heartbeat handling, buffer management, memory pooling, and JVM/TCP tuning—to build stable, high‑performance backend push systems.
This article explains why Python objects consume more memory than expected, demonstrates how to measure the true size of objects with a recursive get_size function, and shows that adding __slots__ to a class can dramatically reduce memory consumption while slightly improving performance.
To prevent crashes, forced‑out‑of‑memory terminations, and battery drain in image‑heavy iOS apps, developers should avoid retaining unused UIImages, use efficient scaling with UIGraphicsImageRenderer, employ autorelease pools, stream thumbnails via ImageIO, and downsample to view size, cutting peak memory usage from ~600 MB to ~221 MB.
Explore a collection of lesser‑known Python tricks—including string sanitization, iterator slicing, context‑manager shortcuts, memory‑saving slots, resource limits, controlled imports, and simplified ordering—each illustrated with concise code examples to help you write cleaner, more efficient programs.
This article explains how to locate the intersecting URLs between two 5‑billion‑record files (≈320 GB total) using a hash‑based divide‑and‑conquer method that fits within a strict 4 GB memory limit.
This article explores front‑end memory challenges when rendering large numbers of map annotations, explains heap vs. stack storage, hash‑based object handling, TypedArray/DataView usage, shared memory with Web Workers, and provides performance test results and practical optimization recommendations.
Through a 30‑minute Apache JMeter load test on the Spring Boot Petclinic sample, we captured heap dumps and used HeapHero to reveal that 65% of memory is wasted due to string duplication, inefficient collections, and poor initialization, offering concrete code‑level recommendations to improve memory efficiency.
This article explains how 1980s games like Contra and Super Mario Bros. managed to deliver multiple levels and rich gameplay within just 64–128 KB by reusing tiles, compressing assets, leveraging simple code and specialized audio chips, illustrating the ingenuity of early game developers.
This tutorial explains Redis bitmap operations, covering SETBIT, GETBIT, BITCOUNT, and BITOP commands, their syntax, underlying SDS structure, time‑complexity analysis, memory‑size calculations, and practical scenarios such as user sign‑in tracking and online‑user statistics.
The article systematically explains how HBase's MemStore uses a SkipList‑based model and introduces successive memory‑management optimizations—MemStoreLAB, ChunkPool, off‑heap chunks, CompactingMemStore and the CCSMap data structure—to reduce object overhead, GC pressure and improve throughput.
This article explains how to dramatically reduce Redis memory consumption—by up to 90%—through converting long string keys to integers, leveraging zipList‑encoded hashes, and distributing millions of key‑value pairs across many hash buckets while maintaining query performance.
This article explains the purpose and behavior of Python's yield keyword, how generators work, their difference from regular functions, and demonstrates practical examples including iterator concepts, itertools utilities, and memory‑efficient looping techniques.
This article explains how iOS manages low‑memory conditions through the Jetsam mechanism, analyzes the kernel code that decides which processes to kill, and provides practical image‑handling and autorelease‑pool techniques to lower the probability of Out‑Of‑Memory crashes in iOS apps.
The article analyzes PHP7's memory optimizations by comparing the zval and HashTable structures of PHP 5.3 and PHP 7.2, showing how reduced sizes and better cache‑line alignment lead to significant performance improvements.
This article explains the concept of hash functions and hash tables, illustrates how they map data to array indices, discusses collision resolution methods, and details Redis's internal dictionary implementation, including zipmap optimization, operation complexities, and practical usage differences between hashes and sets.
This article introduces practical CPU and memory subsystem performance tuning for Kunpeng processors, covering optimization concepts, key parameters, common monitoring tools such as top, perf and numactl, and detailed methods like NUMA binding, prefetch control, timer tuning, TLB page size adjustment, and thread concurrency optimization.
This article explains why large numbers of active Python objects can cause memory problems and presents several techniques—including using dicts, class __slots__, namedtuple, recordclass, Cython, and NumPy—to shrink object size and dramatically lower memory consumption.
V8 Lite, introduced by the V8 team in late 2018, implements a series of memory‑saving techniques—such as lazy feedback allocation, delayed source positions, and bytecode flushing—that together can reduce heap usage by roughly 22% in memory‑constrained scenarios while maintaining acceptable execution performance.
Over three years, Meitu’s long‑connection service “bifrost,” built in Go with MQTT, cut memory use from 22.3 GB to 5.1 GB for 210 k connections—and about 10 GB for a million—by tuning buffers, reducing allocations, employing memory pools, and replacing a goroutine‑per‑connection model with an epoll‑driven event architecture.
This article explains how MX Player replaced a Redis‑based user‑history list with per‑user Bloom Filters, dramatically reducing memory consumption and improving filtering efficiency for its recommendation system.
This article explains the principle, implementation, configuration, and practical performance impact of Linux Kernel Samepage Merging (KSM), showing how it reduces memory usage in containerized game services while outlining integration costs, risks, and monitoring guidelines.
This article explains how to improve Spark and Spark Streaming performance by tuning serialization, broadcast variables, parallelism, batch intervals, memory usage, garbage collection, and Kafka integration, providing practical code examples and real‑world optimization results.
Redis, the in‑memory data store, uses a simple RESP text protocol, offers limited ACID‑style transactions without rollback, employs optimistic locking via WATCH, provides multiple persistence options (RDB, AOF, hybrid), optimizes memory with ziplist and quicklist structures, and implements sophisticated replication and expiration strategies to balance performance and resource usage.
This article explains why Redis achieves exceptional performance by using pure in‑memory operations, a single‑threaded model, efficient data structures like SDS, skip‑list, ziplist, and various encoding and rehash optimizations that reduce memory allocation and CPU overhead.
The article discusses an interview scenario where a candidate must determine the most frequent integer among billions of values using only a few gigabytes of memory, exploring hash tables, file partitioning, and hashing strategies to handle massive data sets efficiently.
The article describes a custom Flutter photo album component that uses a MethodChannel to bridge native modules for permission, caching, decoding, and OpenGL texture conversion, implements MVC architecture, employs lazy GridView pagination, GPU‑based resource recycling, scaled bitmap preview, and PageView preloading to achieve flexible UI, multi‑selection, and low memory usage, while remaining extensible for future features.
This article presents SlimTrie, a trie‑based indexing structure that dramatically reduces memory consumption while maintaining fast query speeds, detailing its design, compression techniques, implementation steps, memory analysis, and performance comparisons with map and B‑Tree structures for large‑scale storage systems.
QQ Music’s Android team modernized the app for Android 9 Pie by integrating full‑screen displays, native notifications, and enhanced memory profiling, while re‑architecting its dual‑process playback system to cut memory use up to 50%, and adopting Kotlin to shrink code by 25% and halve null‑pointer crashes, delivering a smoother listening experience.
The article explains how excessive memory use in a Flutter app, caused by ImageCache and related image handling, was diagnosed with Xcode Instruments and Dart Observatory, then mitigated through refined caching policies, adaptive screenshot resolution, improved FlutterViewController lifecycle management, and targeted garbage‑collection techniques, resulting in lower memory peaks and greater stability.
This article recounts a 2017 internal high‑performance competition where a C server handling a 40 million‑row user‑info dataset was progressively optimized through data compression, custom hash tables, memory layout redesign, and a thread‑pool model, ultimately achieving a four‑fold throughput increase.
This article explains Redis's five core data structures, their internal representations, practical use‑cases, memory‑saving configuration parameters, and the four persistence mechanisms, providing concrete examples and recommendations to improve performance and stability.
The SkullGreymon team, winners of the biggest improvement award in the Tencent Social Ads university algorithm competition, share their journey from a late start in the preliminaries to significant performance gains in the finals, detailing memory‑saving feature extraction techniques, pandas and numpy usage, and their XGBoost modeling approach.
This article explains the internal structure and encoding of Redis's ziplist (compressed list), describes its memory layout and node format, and analyzes how Redis leverages this data structure across different types such as lists, hashes, and sorted sets to reduce memory usage and fragmentation.
This article explains Android's memory allocation and reclamation mechanisms, enumerates common memory problems such as leaks, OOM, and bitmap handling, and demonstrates a comprehensive optimization case study on the JOOX music app that reduced average memory consumption by over 40 MB.
This article explains Redis's five core data types, their internal representations and typical commands, details memory‑saving parameters for each type, compares the four persistence methods with their trade‑offs, and offers practical recommendations for optimal performance and stability.
The article presents a large‑scale DMP caching solution that stores billions of third‑party IDs and demographic tags in memory by compressing keys with MD5‑derived bucket IDs, applying eviction policies, reducing memory fragmentation, and demonstrating up to 78% memory savings.
This article explains Redis’s ziplist (compressed list) memory layout, detailing its overall encoding, node structure—including previous length, encoding, and content fields—illustrates how various Redis data types employ ziplist encoding, and analyzes the benefits and trade‑offs of using this structure.
This article explains how to use Android Studio’s Allocation Tracker, automate its start/stop via code using the ddmlib library, and directly access Dalvik’s internal allocation records to retrieve object size, type, and stack information with minimal performance impact, while discussing limitations and compatibility concerns.
This article explains why PHP arrays consume far more memory than their C equivalents and demonstrates a technique that stores a double array in a string using pack/unpack, which can dramatically lower memory consumption at the cost of some performance.
Redis’s hash‑max‑ziplist‑entries and hash‑max‑ziplist‑value settings control when hash tables switch to compressed ziplist storage, and by segmenting data into 1,000‑item hash tables, Instagram reduced memory usage from ~20 GB to about 5 GB, dramatically improving efficiency.
This article explains Android's DisplayMetrics density values, shows how to calculate a Bitmap's runtime memory footprint using getByteCount, explores the impact of screen density, pixel format, and scaling, and provides practical techniques such as inSampleSize, matrix scaling, and pixel format selection to minimize memory consumption.
PHP 7.0, released after a decade of development, delivers more than double the speed of PHP 5 and rivals Facebook’s HHVM by cutting memory usage, optimizing CPU cache behavior, and tackling the challenges of adding a JIT compiler to a dynamic language.
This article explains how a table's memory footprint equals row count times row size and shows why careful data‑type selection—using CHAR over VARCHAR for fixed‑length fields and separating article metadata from content—can significantly reduce memory usage.