The first call to a ria service is slow if they are many assemblies without PublicKeyToken (5s on my project).
The problem is the try/catch in OpenRiaServices.DomainServices.TypeUtility.IsSystemAssembly.
Solution : test if the key is null
```
try
{
if (assemblyFullName.Substring(idx + 15, 4) == "null")
return false;
string publicKeyToken = assemblyFullName.Substring(idx + 15, 16);
return systemAssemblyPublicKeyTokens.Any(p => p.Equals(publicKeyToken, StringComparison.OrdinalIgnoreCase));
}
catch (ArgumentOutOfRangeException)
{
return false;
}
```
With this modification, the first call take 0.8s.
Comments: I think I have created a fix for the issue. Would you please try to see if my pull request solves your issue. https://openriaservices.codeplex.com/SourceControl/network/forks/danneesset/openriaservices/contribution/8894
The problem is the try/catch in OpenRiaServices.DomainServices.TypeUtility.IsSystemAssembly.
Solution : test if the key is null
```
try
{
if (assemblyFullName.Substring(idx + 15, 4) == "null")
return false;
string publicKeyToken = assemblyFullName.Substring(idx + 15, 16);
return systemAssemblyPublicKeyTokens.Any(p => p.Equals(publicKeyToken, StringComparison.OrdinalIgnoreCase));
}
catch (ArgumentOutOfRangeException)
{
return false;
}
```
With this modification, the first call take 0.8s.
Comments: I think I have created a fix for the issue. Would you please try to see if my pull request solves your issue. https://openriaservices.codeplex.com/SourceControl/network/forks/danneesset/openriaservices/contribution/8894