Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Performance: Make plugin initialization path async #372

Closed
bryphe opened this issue Apr 15, 2017 · 0 comments
Closed

Performance: Make plugin initialization path async #372

bryphe opened this issue Apr 15, 2017 · 0 comments

Comments

@bryphe
Copy link
Member

bryphe commented Apr 15, 2017

In Plugin.ts, the plugin initialization path is synchronous:

        if (fs.existsSync(packageJsonPath)) {
            this._oniPluginMetadata = PackageMetadataParser.parseFromString(fs.readFileSync(packageJsonPath, "utf8"))

Making this async (by factoring out to an initialize method that returns a promise, instead of doing two synchronous File I/O calls) will help improve startup performance and responsiveness.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant