Common File Attribute Processing for API Loading Time
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large API files result in prolonged load times and system unavailability during updates, as all attributes are read and new objects are created, even when only a subset is affected, affecting system readiness and zero-downtime goals.
Innovation Solution
Implementing common file attribute processing by parsing XML files, identifying common attributes, and retrieving their data from storage to create a reference object, thereby skipping the creation of new attribute objects for these attributes, reducing the processing load and memory usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If all attributes are read and new objects are created during API loading, then the API file can be fully processed, but the loading time increases significantly
Solution Approach 1:
The patent applies preliminary action by identifying and caching common attributes before the main processing loop. The system pre-processes the XML file to extract attributes that appear multiple times, stores them in a cache, and then reuses these cached values during subsequent processing, avoiding redundant parsing and object creation operations.
Solution Approach 2:
The patent uses copying by creating a cache of common attribute objects that can be referenced multiple times. Instead of creating new attribute objects for each occurrence of common attributes, the system copies references to the cached objects, significantly reducing memory allocation and processing overhead while maintaining data integrity.
2Reliability
If all attributes are processed during API updates, then the updated API can be fully reloaded, but the system remains unavailable for a long time
Solution Approach 1:
During API updates, the system performs preliminary identification of changed attributes and only processes those specific changes rather than reprocessing all attributes. This selective approach maintains update completeness while minimizing the time the system remains unavailable.
Solution Approach 2:
The patent extracts and processes only the changed attributes during API updates, separating the update process from a full reprocessing cycle. By taking out only the necessary changes and applying them selectively, the system maintains reliability while significantly improving availability during update operations.
3Loss of information
If new attribute objects are created for every attribute, then the API data can be fully represented, but the memory usage and processing load increase
Solution Approach 1:
The patent implements copying by creating a single instance of common attribute objects and storing them in a cache. Multiple references to these cached objects are used throughout the API structure, ensuring complete data representation while dramatically reducing the total number of objects in memory and the associated processing load.
Solution Approach 2:
The cached attribute objects serve multiple purposes and are reused across different parts of the API structure. This universal approach allows the same attribute object to represent the same data in multiple contexts, eliminating redundant storage and reducing overall memory consumption while preserving complete API information.
Data Source
AI summary
Common file attribute processing is used for providing enhanced loading time of Application Programming Interface (API) files. An Extensible Markup Language (XML) file of an API is parsed. XML element objects in XML file are parsed. Whether there is at least one common attribute for the XML element objects is determined. In response to determining there is at least one common attribute for the XML element objects, attribute data for the at least one common attribute is retrieved from storage and the attribute data is added in an API resource object.


