Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The node implementation of getDefaultTranslationsFactory is inefficient #23

Open
charlespwd opened this issue Apr 14, 2023 · 0 comments

Comments

@charlespwd
Copy link
Contributor

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.

@charlespwd charlespwd transferred this issue from another repository Apr 14, 2023
@charlespwd charlespwd transferred this issue from another repository Aug 14, 2023
@charlespwd charlespwd self-assigned this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants