Memory caching for browser processes
US-9069876-B2 · Jun 30, 2015 · US
US9811324B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-9811324-B2 |
| Application number | US-201514726376-A |
| Country | US |
| Kind code | B2 |
| Filing date | May 29, 2015 |
| Priority date | May 29, 2015 |
| Publication date | Nov 7, 2017 |
| Grant date | Nov 7, 2017 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
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.
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
Physics · mapped topic
Embedded in an application, e.g. JavaScript in a Web browser · CPC title
Runtime instruction translation, e.g. macros · CPC title
Reducing the memory space required by the program code · CPC title
Electricity · mapped topic
Related publications grouped by family.
Answers are generated from the same data shown on this page.