AUTOMATIC CACHING OF PARTIAL RESULTS WHILE EDITING SOFTWARE
First Claim
1. A computer-implemented method to instrument a software program with automatic caching of results, the method comprising:
- receiving a software program that has been edited by an editing user;
automatically identifying one or more cache points between instructions of the received software program that indicate one or more locations where data has been gathered or computed and can be cached to avoid at least one subsequent gathering or computation of the same data;
instrumenting the received software program to add caching logic that checks for and stores cached data at identified cache points; and
storing the instrumented program code for execution upon invocation of the software program,wherein the preceding steps are performed by at least one processor.
2 Assignments
0 Petitions
Accused Products
Abstract
An automatic caching system is described herein that automatically determines user-relevant points at which to incrementally cache expensive to obtain data, resulting in faster computation of dependent results. The system can intelligently choose between caching data locally and pushing computation to a remote location collocated with the data, resulting in faster computation of results. The automatic caching system uses stable keys to uniquely refer to programmatic identifiers. The system annotates programs before execution with additional code that utilizes the keys to associate and cache intermediate programmatic results. The system can maintain the cache in a separate process or even on a separate machine to allow cached results to outlive program execution and allow subsequent execution to utilize previously computed results. Cost estimations are performed in order to choose whether utilizing cached values or remote execution would result in a faster computation of a result.
14 Citations
20 Claims
-
1. A computer-implemented method to instrument a software program with automatic caching of results, the method comprising:
-
receiving a software program that has been edited by an editing user; automatically identifying one or more cache points between instructions of the received software program that indicate one or more locations where data has been gathered or computed and can be cached to avoid at least one subsequent gathering or computation of the same data; instrumenting the received software program to add caching logic that checks for and stores cached data at identified cache points; and storing the instrumented program code for execution upon invocation of the software program, wherein the preceding steps are performed by at least one processor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer system for automatic caching of partial results while editing software, the system comprising:
-
a processor and memory configured to execute software instructions embodied within the following components; a program editing component that provides an interface that receives software program actions from a software developer; a cache point identifying component that identifies one or more points among the received software program actions at which to cache programmatic results related to each point; a program instrumenting component that instruments the received software program actions to place additional caching actions at the identified cache points; a cached results store that stores data that is cached for subsequent use by the instrumented software program actions; a program executing component that provides an execution environment for carrying out the software program actions; a cache cost component that determines a cost of accessing cached data versus recomputing the data expected to be in the cache; and a recompute decision component that receives cost information determined by the cache cost component and selects either the cache or recomputation as the source of data for a particular program action. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. A computer-readable storage medium comprising instructions for controlling a computer system to execute a software program previously instrumented to automatically cache intermediate data, wherein the instructions, upon execution, cause a processor to perform actions comprising:
-
receiving a request to execute a software program previously instrumented to automatically cache data at identified points within the program; identifying a cache instruction that is an instrumented point in the program code where the system may either use previously cached results to skip a block of code, or may execute the block of code to produce a result that can then be cached and used to bypass subsequent execution of the block of code; performing a cost analysis that weighs a cost associated with accessing cached data against a cost associated with computing the data without using the cache; upon selecting the cache for retrieving data, retrieving cached data associated with the identified cache instruction based on a cache key that identifies a point within the software program that produces particular results stored in the cache; and advancing the next instruction to be executed of the software program beyond any instructions that can be skipped due to use of the cached data.
-
Specification