The same traversal of compiled structures happened in the old system too
(since the snapshot has to contain a transitive closure of all objects that
the compilation creates, which is more than you might think), it was just
hidden from the API. If you were to call Serialize immediately after Compile,
you'd have the exact same behaviour (performance and all) as previously
with Compile(..., kProduceCodeCache), it's just that you can now choose to
call it later.

See also the blog post on this, there are a *lot* of benefits to splitting
the two up:
https://v8project.blogspot.com/2018/04/improved-code-caching.html

On Wed, Jul 4, 2018 at 4:18 PM A.M. <[email protected]> wrote:

>  > We don't scan the source when creating a code cache.
>
> Poor choice of words on my part with regards to scanning the source, since
> the the method that returns cached data is a compiled script. I was
> referring to `CodeSerializer::Serialize`, which has to traverse the
> compiled script structures and the logic would suggest that this would
> touch same structures that were created while compiling, but I see what you
> are saying about being able to create code cache at different times. Thank
> you for this details. Much appreciated.
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to