Quantcast
Channel: Open RIA Services
Viewing all articles
Browse latest Browse all 124

Commented Issue: Slow first call to a service [94]

$
0
0
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

Viewing all articles
Browse latest Browse all 124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>