Author Topic: Loading a .xaml takes some minutes  (Read 1876 times)

deuse

  • Community Member
  • Posts: 33
  • Hero Points: 0
Loading a .xaml takes some minutes
« on: June 30, 2015, 07:35:24 am »
If I'm loading a .xaml file (C#, .NET) for editing in slick, it takes some time. Maybe slick looks for something in the net, maybe the scheme, which slick cannot find or access. Since I only want to edit, validating is not necessary, I don't want this behaviour.

Does anyone know how to turn this off? I already tried to insert some url mapping in Options->Network & Internet Options->URL Mappings, but this didn't help.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4813
  • Hero Points: 390
Re: Loading a .xaml takes some minutes
« Reply #1 on: June 30, 2015, 11:30:31 pm »
Check that you have auto validate off (Tools>Options>Xml/Text Languages>Xml>Formatting turn off "Auto validate on open").

If auto validate is off, it's probably referencing some web address in attempt to build a tag file.

If auto validate is off, please provide a sample an we can look into it.

deuse

  • Community Member
  • Posts: 33
  • Hero Points: 0
Re: Loading a .xaml takes some minutes
« Reply #2 on: July 01, 2015, 09:26:58 am »
Hi Clark, thanks for your answer!

Auto validate is off by default.

The beginning of the .xaml reads:
<UserControl x:Class="XY.App.SomeClass"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="400" d:DesignWidth="1900" xmlns:my="clr-namespace:XY.App.Controls">

Slick shows the following message:
DTD 'http:\\schemas.microsoft.com\expression\blend\2008' for file 'C:\SomePath\SomeFile.xaml' not found.
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 tried to insert such a mapping, but only to my tmp directory, where no schema files are located. I don't have these files (a quick search at microsoft for these files didn't bring any success), and frankly, I don't want to care for them. I think, slick should be able to suppress the validation.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4813
  • Hero Points: 390
Re: Loading a .xaml takes some minutes
« Reply #3 on: July 01, 2015, 11:53:44 am »
It isn't validation. It's tag file related stuff (for auto completions and color coding). We will look into this. Thanks

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4813
  • Hero Points: 390
Re: Loading a .xaml takes some minutes
« Reply #4 on: July 01, 2015, 04:02:19 pm »
Something must be wrong with the mapping you set up. Sadly, you must use forward slashes (backslashes don't work). I added the following mapping:

http://schemas.microsoft.com/expression/blend/2008 --> c:\temp\not-found

Now my message doesn't show http:\\... for the DTD that was not found. Instead it shows DTD 'c:\temp\not-found' not found.

Looking into adding some sort of option to never attempt to access an http:// address when opening an XML file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4813
  • Hero Points: 390
Re: Loading a .xaml takes some minutes
« Reply #5 on: July 01, 2015, 07:31:32 pm »
There's already an option to disable the extra work for accessing the DTD for color coding and auto completions.

Set the macro variable "def_xml_no_schema_list "to ".xml" if you don't ever want this done for any DTD.

deuse

  • Community Member
  • Posts: 33
  • Hero Points: 0
Re: Loading a .xaml takes some minutes
« Reply #6 on: July 02, 2015, 06:55:45 am »
That worked! Thank you, Clark! ;D