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

Improve responsiveness for large XML files by turning off background validation. #14

Open
tillgrallert opened this issue Jun 15, 2021 · 2 comments
Assignees

Comments

@tillgrallert
Copy link

I am playing around with this extension and I am generally impressed by the functionality, which leads me to recommend VSCoce as a viable alternative to oXygen for editing XML files with bi-directional content. However, when I am editing a rather large XML file of some 5,5 MB (a TEI-encoded bibliography of more than 3500 entries), suggestions take about 5-10 seconds after typing the opening bracket <. I assume that the problem is that in the background the extension re-validates the XML because typing < invalidated the document (wellformedness is obviously violated). It would be great if one could turn off continuous validation for this purpose.

Another benefit of such an option would be massive energy savings and thus improved battery life even on modern laptops. Editing said XML file, my recent 15" MacBook Pro uses 300% CPU cycles for VSCode and the extension, quickly draining the battery.

@angelozerr
Copy link

angelozerr commented Dec 22, 2022

Could you share please your big xml and rng files.

@raffazizzi raffazizzi self-assigned this Dec 23, 2022
@raffazizzi
Copy link
Owner

HI @tillgrallert, thanks for reporting this! The next release will have a configuration file, so I'll experiment with adding an option for this. The extension uses a SAX approach for autocompletion, so it will still need to parse the file up to the cursor in order to provide suggestions, which means the 5-10 sec problem may not get much better even without continuous validation. But hopefully it will at least reduce CPU usage.

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

3 participants