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

Option to render only on save #170

Open
LswaN58 opened this issue May 28, 2024 · 1 comment
Open

Option to render only on save #170

LswaN58 opened this issue May 28, 2024 · 1 comment

Comments

@LswaN58
Copy link

LswaN58 commented May 28, 2024

This is motivated by a series of other issues with the extension that currently cripple the user experience, in particular the CPU load issues reported (and confirmed by many commenters) in #129. This issue locks up the editor, though some keystrokes still register.

Because this extension renders on every change to the previewed file, I frequently have the extension lock up on an intermediate point (e.g. I've typed half the name of a node), then when it finally finishes, the extension locks up again on a malformed version of the node name. Theoretically there may be some way to fix this through the existing settings, but these are poorly-documented, relying on internal technical details such as when/how rendering requests are created and "blocked."

While the ultimate fix would be to address the CPU load and/or use more flexible, intelligent rendering approaches, these may be beyond the control of the addon (i.e. the result of limitations in an underlying graphviz rendering engine, or VS Code itself). In the meantime, there is one clear change that could reduce the severity of the issue.

The extension should add an option to disable render-on-change, and only render when the file is saved. When a user experiences the problems I described above, they could use this setting to ensure the extension does not brick their VS Code on half-typed edits that were not meant to be rendered yet. This would give them some degree of control over the rendering process, allowing them to ensure renders only occur when they have made a complete edit to the file.

@donangel
Copy link

+1 for this.
On MacOS M1, I'm getting locks very frequently, while working on the diagram. I assume it's because of the errors I make.

Option "Render on Save" would be great. And an option to see the errors, too.

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

No branches or pull requests

2 participants