History-Based Build Cache for Program Regeneration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional methods for regenerating programs from source code are time-consuming and computationally expensive, especially when using the bisection technique, which often results in delayed program testing and increased downtime due to repeated regeneration of the same files and inefficient cache management.

Innovation Solution

A history-based build cache system that stores program components in directories associated with versions, compares candidate versions to a test version, estimates the work required to regenerate the program, and selects the candidate version with the least amount of work, using components from that version to regenerate and test the program, while intelligently pruning the cache based on released versions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional methods are used to regenerate programs from source code, then the program can be regenerated, but the process is time-consuming and computationally expensive

Engineering Contradiction:
Improveprogram regeneration speedVSAvoiddowntime due to repeated regeneration
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by pre-building and caching program components in a build cache before they are actually needed. When a program needs to be regenerated, the system retrieves pre-computed components from the cache rather than regenerating everything from scratch, significantly reducing regeneration time and downtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of program components and stores them in the build cache. Instead of regenerating components every time, the system uses cached copies that are identical to the original compiled components, enabling rapid program regeneration without recomputing everything.

Inventive Principle:
Principle #26Copying

2Productivity

If the bisection technique is used for program regeneration, then the search space is reduced, but repeated regeneration of the same files occurs and cache management becomes inefficient

Engineering Contradiction:
Improvetesting speedVSAvoidcomputational resources wasted on repeated regeneration
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system implements feedback mechanisms where the build cache is updated based on the results of program regeneration and testing. When a program version is tested, the system learns which components were actually regenerated and which could have been retrieved from cache, using this feedback to optimize future cache management and reduce unnecessary regeneration operations.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes the parameters of cache management by introducing version-based caching, where different program versions are cached separately. This allows the system to distinguish between different builds and avoid regenerating components that are identical across versions, reducing computational waste while maintaining the benefits of the bisection technique.

Inventive Principle:
Principle #35Parameter changes

3Speed

If program components are stored in directories associated with versions, then the system can efficiently locate and retrieve components, but cache pruning becomes complex

Engineering Contradiction:
Improvecomponent retrieval speedVSAvoidcache pruning complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The system segments the build cache into separate directories or storage locations associated with different program versions. This segmentation allows the system to quickly locate and retrieve components for a specific version without searching through the entire cache, improving retrieval speed while managing complexity through organized structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system uses partial cache pruning by only removing or managing cache entries for versions that are no longer needed, rather than managing the entire cache complexly. By focusing pruning operations on specific version ranges or older versions, the system maintains simplicity while achieving effective cache management.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11194702B2History based build cache for program builds
Publication Date: 2021.12.07 RED HAT INC
  • US11194702B2 patent drawing
  • US11194702B2 patent drawing
  • US11194702B2 patent drawing

AI summary

A system includes a memory storing program versions in a program history and a processor in communication with the memory. The processor is configured to store program components of a version of a program in a first directory associated with the version and select first and second candidate versions of the program from the program history to compare to a test version of the program. The processor is also configured to compare the first and second candidate versions to the test version, estimate an amount of work to regenerate the program from each of the candidate versions, and select the candidate version associated with a lesser amount of work. Additionally, the processor is configured to regenerate the program using components from the selected candidate version to create a regenerated program, store components of the regenerated program in a second directory associated with test version, and test the regenerated program.