I am experimenting with having a lot of different contexts(1000+) running in a single process multi threaded application which share the same javascript codebase. Every time a new context is created, I currently run the compiled javascript source code in the scope of the new context. Depending on the size of the source code, the memory usage of a single context goes up to over 1MB in my tests, too much for the application I have in mind.
Is it possible to either: .) serialize contexts that have not been used recently to disk and load them back into memory on demand .) create a single context containing the javascript definitions once and "link" new contexts to this context .) reduce memory usage by creating a custom snapshot that contains my javascript source at runtime or would this go against v8's design ? Is there any other way to reduce memory usage in this case? -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
