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

Very large XML's hang for a long time on edit #51

Closed
sbalderrama opened this issue May 1, 2020 · 2 comments
Closed

Very large XML's hang for a long time on edit #51

sbalderrama opened this issue May 1, 2020 · 2 comments

Comments

@sbalderrama
Copy link

If you have a very large XML, and edit something towards the end of the XML, it will hang up for a substantial amount of time. Even on not so large XML's the time delay after editing a node value is noticeable.

The source of the delay is the CheckChange call in XmlTreeView.OnModelChanged, which appears to be doing an exhaustive search of the XML document on every edit.

@GlacierEclipse
Copy link

@sbalderrama
Hey, I've encountered the same issue as I work with large XMLs as-well, I think it has to do with this line:

if (null == FindNode(node) && !IsEditing && saving && node != null)

The first condition runs FindNode(node) (super heavy) even when we are not saving, moving that condition to the end I went from duplicating large nodes taking ~11 sec to ~100ms.

@clovett
Copy link
Contributor

clovett commented Jan 16, 2021

Oh, hey nice find, this FindNode call is indeed bogus, and the FindNode implementation was also very bad, expanding everything rather than just the immediate parent chain to the desired node, so I've fixed both of these issues in 2.8.0.18. This will also greatly improve performance of "Find" on large documents.

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

4 participants