Code caching system

US9811324B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9811324-B2
Application numberUS-201514726376-A
CountryUS
Kind codeB2
Filing dateMay 29, 2015
Priority dateMay 29, 2015
Publication dateNov 7, 2017
Grant dateNov 7, 2017

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems and methods for code caching are provided. A first indication of primary source code awaiting execution is received. A resource cache is checked for cached data corresponding to the primary source code. Upon a cache miss in the resource cache, a first executable code compiled from the primary source code is obtained. A secondary source code referenced in the primary source code is selected. A second executable code compiled from the selected secondary source code is obtained. The first executable code and the second executable code are serialized into serialized code. The serialized code is stored as cached data in the resource cache.

First claim

Opening claim text (preview).

What is claimed is: 1. A code caching system comprising: a memory comprising instructions; and one or more processors configured to execute the instructions to: upon a cache miss in a resource cache: obtain first executable code compiled from primary source code awaiting execution; obtain second executable code compiled from secondary source code referenced in the primary source code and selected based on one or more of a size of the secondary source code or compile time of the secondary source code; serialize the first executable code and the second executable code into serialized code that is configured to be reconstructed in multiple execution contexts; store the serialized code, an object referenced in the selected secondary source code, an access method for accessing the object referenced in the selected secondary source code, and a type of the object as cached data in the resource cache, wherein the instructions cause the one or more processors to use the access method to access the cached object when a cache hit occurs for the cached object and when the type of the object matches an object type of a data access for the cache hit; obtain an execution history of the selected secondary source code; and replace the selected secondary source code with other secondary source code that has been more frequently executed than the selected secondary source code based on the execution history of the selected secondary source code. 2. A code caching system comprising: one or more processors; and a machine-readable medium comprising instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform operations comprising: receiving a first indication of primary source code awaiting execution; checking a resource cache for cached data corresponding to the primary source code in response to receiving the first indication; and upon a cache miss in the resource cache: obtaining first executable code compiled from the primary source code; selecting secondary source code referenced in the primary source code based on one or more of a size of the secondary source code or compile time of the secondary source code; obtaining second executable code compiled from the selected secondary source code; serializing the first executable code and the second executable code into serialized code that is configured to be reconstructed in multiple execution contexts; storing the serialized code, an object referenced in the selected secondary source code, an access method for accessing the object referenced in the selected secondary source code, and a type of the object as cached data in the resource cache, wherein the instructions cause the one or more processors to use the access method to access the cached object when a cache hit occurs for the cached object and when the type of the object matches an object type of a data access for the cache hit; obtaining an execution history of the selected secondary source code; and replacing the selected secondary source code with other secondary source code that has been more frequently executed than the selected secondary source code based on the execution history of the selected secondary source code. 3. The system of claim 2 , wherein the instructions further cause the one or more processors to perform operations comprising: obtaining execution results from execution of the first executable code in a first execution context, wherein the selected secondary source code is selected based on the execution results. 4. The system of claim 3 , wherein the instructions further cause the one or more processors to perform operations comprising: receiving a second indication of the primary source code awaiting execution in a second execution context, wherein the second indication is received subsequent to the first indication; checking the resource cache for cached data corresponding to the primary source code and to the selected secondary source code, in response to receiving the second indication; and upon a cache hit in the resource cache: retrieving the cached data comprising the serialized code from the resource cache; deserializing the retrieved serialized code, into third executable code; and providing the third executable code for execution in the second execution context. 5. The system of claim 4 , wherein the first execution context and the second execution context are two different virtual machine environments for code execution. 6. The system of claim 5 , wherein the primary source code is a script in a web page and the first execution context and the second execution context are web browser sessions within which the script is executed. 7. The system of claim 2 , wherein the selected secondary source code is selected further based on one or more of a size of the second executable code, a prediction that the selected secondary source code is referenced in the primary source code, a number of times the selected secondary source code is referenced in the primary source code, or a frequency of the selected secondary source code referenced in the primary source code. 8. The system of claim 2 , wherein the primary source code is a top-level script of a web page. 9. The system of claim 2 , wherein the first executable code comprises a set of references including memory addresses embedded in the first executable code, and wherein serializing the first executable code includes replacing the embedded memory addresses with abstract addresses. 10. A code caching system comprising: one or more processors; and a machine-readable medium comprising instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform operations comprising: receiving a first indication of primary source code awaiting execution; checking a resource cache for cached data corresponding to the primary source code in response to receiving the first indication; and upon a cache miss in the resource cache: obtaining first executable code compiled from the primary source code; selecting secondary source code referenced in the primary source code based on one or more of a size of the secondary source code or compile time of the secondary source code; obtaining, second executable code compiled from the selected secondary source code; serializing the first executable code and the second executable code into serialized code that is configured to be reconstructed in multiple execution contexts based on one or more of a size of the primary source code, a number of times or a frequency of the primary source code being executed in a predefined period of time, or a compile time of the primary source code; storing the serialized code, an object referenced in the selected secondary source code, an access method for accessing the object referenced in the selected secondary source code, and a type of the object as cached data in the resource cache, wherein the instructions cause the one or more processors to use the access method to access the cached object when a cache hit occurs for the cached object and when the type of the object matches an object type of a data access for the cache hit; obtaining an execution history of the selected secondary source code; and replacing the selected secondary source code with other secondary source code that has been more frequently executed than the selected secondary source code based on the execution history of the selected secondary source code. 11. The system of claim 10 , wherein the selected secondary source code is selected further based on one or more of a size of the second executable code, a prediction that the selected s

Assignees

Inventors

Classifications

  • Physics · mapped topic

  • Embedded in an application, e.g. JavaScript in a Web browser · CPC title

  • G06F9/3017Primary

    Runtime instruction translation, e.g. macros · CPC title

  • Reducing the memory space required by the program code · CPC title

  • Electricity · mapped topic

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9811324B2 cover?
Systems and methods for code caching are provided. A first indication of primary source code awaiting execution is received. A resource cache is checked for cached data corresponding to the primary source code. Upon a cache miss in the resource cache, a first executable code compiled from the primary source code is obtained. A secondary source code referenced in the primary source code is selec…
Who is the assignee on this patent?
Google Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/45529. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 07 2017 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).