Author Topic: Extremely slow opening WiX XML files  (Read 5265 times)

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Extremely slow opening WiX XML files
« on: May 14, 2013, 04:56:48 AM »
When opening even very small WiX XML files, it can take several minutes to open the file.  To try this, make file extensions .wxs, .wxi, and .wxl map to the XML language.  Then to get some sample files, download the WiX source at:
http://wixtoolset.org/releases   (just download the source for any release)

Next open one of the .wxs files in, for example, ...\src\ext\UIExtension\wixlib\

I do a lot of work with WiX files, and this time delay is unbearable.

By the way, the new MDI architecture is great!
 

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Extremely slow opening WiX XML files
« Reply #1 on: May 14, 2013, 02:03:28 PM »
The wsx, wxi, and wxl extensions should already have been mapped to XML. (We use WiX ourselves to build the Windows MSI installer).
What is the namespace in the xmlns in the top-level nodes? Here's what our .wxs source looks like.
Code: [Select]
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

What happens if you turn off the automatic XML validation? In the Options dialog it's under Languages > XML/Text Languages > XML > Formatting. (Checkbox in the right corner)

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Re: Extremely slow opening WiX XML files
« Reply #2 on: May 14, 2013, 02:43:42 PM »
The .wxs, .wxi, and .wxl extensions were probably already mapped.  I only mentioned that because I couldn't remember whether I had added that mapping myself or whether it was already in there.

Turning off the auto validation did not correct the problem, but I just now noticed the following error message:

Error processing DTD 'http://schemas.microsoft.com/wix/2006/wi' for file 'b:\Projects\WiX Source\src\ext\UIExtension\wixlib\FatalError.wxs'. Socket timed out.
If you want to work off-line, use the URL Mappings dialog ("Tools","Options","URL Mappings...") to map a URL to a local path containing the files.

I don't fully understand the message, or how to rectify it.  Is there something else I can disable to prevent this processing.  If all else fails, I suppose I could remap the file extensions to plain text, but then I lose the syntax coloring. 

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Extremely slow opening WiX XML files
« Reply #3 on: May 14, 2013, 03:28:19 PM »
That URL mapping is there to work around just this type of issue. Often those XML namespace URLs are not real addresses, or they have a ton of redirects that end up nowhere. It's the reason why we ship a bunch of prebuilt XML tags for w3.org under our installation directory.

Anyway, what you can do is simply map http://schemas.microsoft.com/wix to some local empty directory, using the Options page under Network & Internet > URL Mappings. When that mapped URL is seen, it'll search the specified local directory for DTDs and XSDs. If you happen to have them, then great. (I was never able to find actual XSDs for WiX.)

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Re: Extremely slow opening WiX XML files
« Reply #4 on: May 14, 2013, 06:13:13 PM »
Thank you.  That did the trick.    :D