Skip to content

The node implementation of getDefaultTranslationsFactory is inefficient #23

@charlespwd

Description

@charlespwd

https://github.com/Shopify/liquid-language-server/blob/main/packages/node/src/index.ts#L67-L92

Even though the body and parsed JSON is cached, we're re-reading the file contents on every call to runChecks.

A smarter approach would be to start a file watcher (presumably with chokidar to avoid weird node.js macos/windows file watch issues) and invalidate the cached value on file system file change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions