I recently started to play around with V8 parse processor, and found there was something called bytes touched along the graph. what does it mean?
And when i tried to apply the IIFE heuristics to eager parse my function, i found that the pre-parse time was reduced. What happens in the pre-parse time? Also, what are the these terminologies such as baseline time, resolution time and nesting level mean?
Even though I executed the function, it still shows up as "non-executed" in parse time. Why is it so?
What are the "bytes touched" in V8 Parse processor?
The number of bytes seen/processed by the parser or preparser. (I don't know why it would ever be negative, that seems surprising; but maybe there's a good reason for it.)
What happens in the pre-parse time?
Preparsing is the initial quick pass over code that will be lazy-compiled later. It's required in order to:
For functions that will be eagerly compiled immediately, preparsing can be skipped. Usually it's beneficial to preparse and lazy-compile though (so any future readers of this: please don't feel tempted to minimize preparsing time, that'd most likely be counter-productive!).
what are the these terminologies such as baseline time, resolution time and nesting level mean?
"baseline time": time for baseline (non-optimized) compilation
"resolution time": time for variable resolution
"nesting level": when a function is defined inside another function, they're "nested". Obviously this can go many levels deep.
Even though I executed the function, it still shows up as "non-executed" in parse time. Why is it so?
Because tracking executed functions in the Parse Profiler is currently not implemented, apparently because nobody needed it.