microsoft / Chakra-Samples

Repository for Chakra JavaScript engine related samples.
MIT License
216 stars 84 forks source link

Reuse parsing result #88

Open vadim-morozov opened 5 years ago

vadim-morozov commented 5 years ago

It is not issue, question only. Is it possible - first - one time parse big script and then - second - many times call different functions from this script with different parameters without repeated parsing? So as not to waste machine time on re-parsing?

liminzhu commented 5 years ago

Hey sorry for the late reply @vadim-morozov . You can parse your script into a function using JsParse and its variants, and call that function with different parameters each time you want to use it.