Quantcast
Channel: Managed Extensibility Framework
Viewing all articles
Browse latest Browse all 265

Created Unassigned: Performance issue in SmallSparseInitonlyArray [14611]

$
0
0
Hello,

I have found a significant performance issue when using lost of Shared parts. 50% of composition time is spent inside System.Composition.Hosting.Util.SmallSparseInitonlyArray.Add on string.Format calls. The error is obvious: the method has 2 calls like

```
Assumes.IsTrue(e.Index != index, string.Format("An item with the key '{0}' has already been added.", index));
```

No matter what the condition is, string.Format gets evaluated every time.

So, MEF is spending 50% time on producing garbage. Definitely not the task a high performance framework should do. :)

Viewing all articles
Browse latest Browse all 265

Trending Articles



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