Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Code Caching

$
0
0
Hi yosy,

V8 caching support comes in the form of new overloads for the V8ScriptEngine.Compile and V8Runtime.Compile methods. For example, to compile a script and produce a code cache, you'd do something like this:
byte[] cacheBytes;
var script = engine.Compile(code, V8CacheKind.Code, out cacheBytes);
After that you could use the cache to accelerate recompilation:
bool cacheAccepted;
var script = engine.Compile(code, V8CacheKind.Code, cacheBytes, out cacheAccepted);
You can download an API reference here.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>