Formalized method for RAM optimization in content-based image retrieval systems
Abstract
This paper presents a formalized method for optimizing RAM usage in content-based image retrieval systems implemented in Java. The method combines two approaches: low-level optimization of data structures and compilation of the application into native code using GraalVM. At its core, the method analyzes commonly used structures for storing image descriptors and replaces them with memory-efficient equivalents at the programming language level. Additionally, native compilation reduces runtime overhead and overall memory consumption during program execution. The method is evaluated using the Multidimensional Cube model, which stores vector descriptors entirely in memory. The paper provides theoretical formulas for estimating memory usage based on data representation structures and presents results of experimental profiling. It also discusses the limitations of the proposed method, including increased compilation time and resource consumption, as well as incompatibility with some software libraries. The optimized implementation shows up to a threefold reduction in RAM usage and improved processing speed, while GraalVM provides an additional runtime memory reduction of up to 73%. The method can be applied to other CBIR systems and broader classes of problems that involve storing large volumes of vector structures in memory, especially when using programming languages with similar data structures and/or GraalVM support.
References
2. Li X., Yang J., Ma J. Recent developments of content-based image retrieval (CBIR). Neurocomputing. 2021. Т. 452. С. 675–689.
3. Chung I.K.Y., Tran M., Nussinovitch E. Scaling Cross-Domain Content-Based Image Retrieval for E-commerce Snap and Search Application. 2022.
4. Gupta D., Loane R., Gayen S., Demner-Fushman D. Medical image retrieval via nearest neighbor search on pre-trained image features. Knowledge-Based Systems. 2023. Т. 278.
5. Kumar N., How Many Google Searches Per Day. DemandSage. 2025
Abstract views: 21 PDF Downloads: 8