DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
324 stars 86 forks source link

Will not re-format large XML files #336

Closed abergsneider closed 3 years ago

abergsneider commented 3 years ago

Description Attempting to format an XML document with over 62k lines of code. Take approximately 2 minutes to run with no changes afterward.

Extension Version v2.5.1

VS Code Version 1.50.1

Operating System Windows 10 Enterprise 2016 LTSB

vyvuhoang commented 3 years ago

I got same issue :(

craigontour commented 3 years ago

I have a 100MB file with 207K lines and it would not render. So I copied bit by bit to new file to help discover the 'problem', but there was nothing wrong. The new file rendered and showed View Tree, until I closed and re-opened. Using MacBook Pro, Big Sur 11.1.2 with 16GB RAM. Nothing else running.

bmghirbi commented 3 years ago

I have the same issue on Windows 10, vscode version 1.54.3

craigontour commented 3 years ago

To update, there were issues with the XML content. It included various fields that caused the rendering to fail.

abergsneider commented 3 years ago

Good morning all, After some digging around I have changed one thing on the settings.json file of the extension and it seems to be doing the job for me now!

Solution:

  1. File/Preferences/Settings/XML/
  2. Scroll down to XML>Sevrer: Vmargs
  3. Click on "Edit in settings.json"
  4. On "xml.server.vmargs": "" add -Xmx1G inside the brackets. Make sure there are no trailing commas if this is your last Key: Value inside the object.

Good luck!