You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The synchronous render() method can occupy the event loop if the input is huge. We can't do much about it without adding lots of complexity or relying on Workers.
We could add a renderAsync() function that does the rendering work in chunks.
Also have a look at tokenization because that can block the event loop too.
The text was updated successfully, but these errors were encountered:
This could be achieved by passing an identity function (x => x) to the renderFnAsync() but with the current setup the code wouldn't look super intuitive. It would be better to add a option for a function that allows processing varNames and turning them into something that render*() would use in its interpolation algorithm.
alexewerlof
changed the title
Support async rendering for performance
Support async compile and rendering to avoid event loop for large & complex templates
Aug 17, 2020
The synchronous
render()
method can occupy the event loop if the input is huge. We can't do much about it without adding lots of complexity or relying on Workers.We could add a
renderAsync()
function that does the rendering work in chunks.Also have a look at tokenization because that can block the event loop too.
The text was updated successfully, but these errors were encountered: