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

Edited Unassigned: 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.

Viewing all articles
Browse latest Browse all 124

Trending Articles



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