Object Shell Reuse for Faster Deserialization and Lower GC Load

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing object-oriented programming languages like Java and Python face inefficiencies in deserialization processes due to the need to recreate entire objects in memory space, leading to low efficiency, increased garbage collection, and potential memory overflow.

Innovation Solution

A deserialization method that pre-creates object shells in memory space, utilizing object pools to reuse these shells, thereby avoiding recreation of objects during deserialization and reducing garbage collection, especially young and full garbage collection, and minimizing memory overflow.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the entire object is recreated in memory space during deserialization, then the object can be obtained, but deserialization efficiency is low

Engineering Contradiction:
Improvedeserialization efficiencyVSAvoidtime for object recreation
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The object is segmented into two parts: the object shell (header and body structure) and the element data. During deserialization, only the element data is filled into the pre-created object shell, rather than recreating the entire object from scratch. This segmentation allows the reusable shell to be retained while only the variable data portion is deserialized.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The object shell (including header and body structure) is pre-created and stored in an object pool before deserialization occurs. This preliminary action eliminates the need to recreate the shell structure during deserialization, significantly reducing the time and computational resources required for the deserialization process.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If objects are recreated during deserialization, then deserialization can be performed, but garbage collection frequency increases

Engineering Contradiction:
Improvedeserialization throughputVSAvoidnumber of objects for garbage collection
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

Instead of discarding object shells after use, the patent recovers and reuses them by storing them in an object pool. When deserialization is needed, shells are retrieved from the pool, used, and then returned to the pool for future use. This recovering approach dramatically reduces the number of objects that need to be garbage collected.

Inventive Principle:
Principle #34Discarding and recovering

3Productivity

If entire objects are recreated in memory space, then deserialization is completed, but memory overflow risk increases

Engineering Contradiction:
Improvedeserialization speedVSAvoidmemory space consumption
Core Design Contradiction:
ProductivityVSVolume of stationary object

Solution Approach 1:

The patent creates a lightweight copy (object shell) that contains only the structural information (header and body layout) without the actual element data. This shell is stored in an object pool and reused multiple times. Only the necessary element data is deserialized and filled into the shell, significantly reducing memory space consumption compared to recreating entire objects.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS12547427B2Deserialization method and apparatus, and computing device
Publication Date: 2026.02.10 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US12547427B2 patent drawing
  • US12547427B2 patent drawing
  • US12547427B2 patent drawing

AI summary

This application discloses a deserialization method. A first object shell of a first object is created in memory space of a process, where the first object shell includes a first object header and a first object body; a serialization result of the first object is obtained; the serialization result of the first object is deserialized based on the first object shell, to obtain the first object; and after the first object is used by the process, the first object shell is released, where the first object shell may be used to deserialize a subsequently received serialization result. Deserialization efficiency is improved by reusing an object shell.