So I noticed today that render() is calling a readFileSync() equivalent (I'm assuming because the built in fs.readFileSync is slower?). My use case is loading the templates into memory first so that I can run a css inliner and other formatters, for email templating. The result is that loading 20 templates takes about 1.5 minutes due to them being sequentially loaded. In theory it would take about -10 seconds if render was async.
Is there a reason why you're not reading files via the async function? I'm confused, because I imagine that would be the best for a performance focused templater.
So I noticed today that
render()
is calling a readFileSync() equivalent (I'm assuming because the built infs.readFileSync
is slower?). My use case is loading the templates into memory first so that I can run a css inliner and other formatters, for email templating. The result is that loading 20 templates takes about 1.5 minutes due to them being sequentially loaded. In theory it would take about -10 seconds ifrender
was async.Is there a reason why you're not reading files via the async function? I'm confused, because I imagine that would be the best for a performance focused templater.