Skip to content

Make .render() actually async #75

Description

@nfour

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions