Skip to content

Use v8-compile-cache to shave ~1/10 second off typescript load time #1339

Closed
@cspotcode

Description

I've forked it: https://www.npmjs.com/package/v8-compile-cache-lib

We can use this solely for loading typescript, since we know it's big and will benefit.

We can't do something as simple as require('v8-compile-cache') because it's technically incompatible with certain types of code. We need to scope the usage to only our TS compiler loading.

Informal testing on my machine cuts ~80 to 100ms.

const v8CC = require('v8-compile-cache-lib').install();
const ts = require('typescript');
v8CC.uninstall();

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions