microsoft / XmlNotepad

XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.
https://microsoft.github.io/XmlNotepad/
MIT License
980 stars 207 forks source link

PasteCommand was updated to call validation only one time #287

Closed olmisa closed 1 year ago

olmisa commented 1 year ago

As I understand the main problem is that when we paste XmlTree then the validation will be called for every element of this XmlTree. The main idea of my fix is to call validation only once for PasteCommand.

Close #82 Close #170

lovettchris commented 1 year ago

Thanks for this but I have a different fix I want to make here that is more general.

lovettchris commented 1 year ago

Can you try this fix? https://github.com/microsoft/XmlNotepad/commit/e7c86855e347459a522e75056b083c06799c8979

olmisa commented 1 year ago

This fix https://github.com/microsoft/XmlNotepad/commit/e7c86855e347459a522e75056b083c06799c8979 works fine. Tested with file and case from issue #170 . Paste took 1 minute or less, before it was 5 minutes or more (i just canceled process after 5 minutes). Great.

olmisa commented 1 year ago

I think we could close this PR)))

lovettchris commented 1 year ago

Cool thanks for testing the fix, I'm glad it works. I will close the PR. Thanks for pushing to get this fixed!