Resource File Optimization via Source Code Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern software applications are large in size, consuming significant computing resources and network bandwidth, and existing techniques for reducing size, such as dead code stripping and file compression, are not always effective or applicable, leading to a need for further reduction in application size.

Innovation Solution

The technique involves analyzing source code and resource files to identify and remove duplicative or unused data, including values that are overwritten in initialization functions, thereby reducing the size of resource files and improving memory, processing, and power efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If dead code stripping is applied during compilation, then code size is reduced, but it does not affect code written in non-compiled languages and is limited by code-flow analysis

Engineering Contradiction:
Improveapplication sizeVSAvoidapplicability to different programming languages
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent segments the application analysis into two distinct phases: compile-time dead code stripping for compiled languages, and runtime dynamic analysis for interpreted languages. This segmentation allows each phase to use optimization techniques appropriate to its language type, thereby resolving the contradiction between reducing application size and maintaining applicability across different programming languages.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If file compression is used to reduce application size, then download size is reduced, but decompression requires expensive processing on the client

Engineering Contradiction:
Improvedownload sizeVSAvoidclient processing energy
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by performing dead code stripping and optimization during the compilation and build process on the server side, before the application is distributed to clients. This eliminates the need for expensive decompression or processing operations on client devices, as the optimization work is completed in advance during application assembly.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If dead code stripping relies on code-flow analysis, then compilation-time optimization is achieved, but code referenced later is incorrectly identified as removable

Engineering Contradiction:
Improvecompilation-time optimization efficiencyVSAvoidaccuracy of dead code identification
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback mechanisms through runtime dynamic analysis that monitors actual code execution paths and resource usage. This feedback allows the system to accurately identify which code and resources are truly unused, preventing incorrect removal of code that may be referenced later under certain conditions. The runtime information feeds back into the optimization process to improve both accuracy and reliability.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP3867746B1User interface resource file optimization
Publication Date: 2024.05.08 EBAY INC
  • EP3867746B1 patent drawingFigure 1
  • EP3867746B1 patent drawingFigure 2
  • EP3867746B1 patent drawingFigure 3

AI summary

Technologies described herein reduce the size of a software application. In some embodiments, the size of one or more resource files of an application are reduced. Resource files include key/value pairs that define elements of the application. In some embodiments, the application's source code is analyzed to determine if an entry in a resource file may be removed. For instance, initialization functions in the application's source code may be analyzed to determine if a value loaded from a resource file is replaced before being used. For example, a button with a color property may be defined as grey by a resource, but later set to orange in an initialization function. In this case, the resource entry defining button as grey is superfluous and may be safely removed. This technique allows for entries to be removed from a resource file even though the source code references the entries.