forked fromdotnet/fsharp
- Notifications
You must be signed in to change notification settings - Fork0
Commit09e5eb5
committed
Codeplex issue: 132 - FSI Shadowcopy -- causes a significant degrade in the fsi first execute time
if you type 1+1;; 2+2;; there is a perhaps 1 second delay between hitting return and seeing the answer when shadow copy is enabled this delay does not occur when shadow copy is not enabled. subsequent statements to the first are not delayed significantly.The Fix is to enable LoaderOptimisation.MultiDomainHost -- this causes the clr to use the ngened images for assemblies that are signed, loaded from the gac and have corresponding ngen images. In the issue scenario, when enabling shadowcopy, the appdomain loader unable to load the ngen images in the appdomain doing the work. This is a known limitation of AppDomains. The solution is to make the assemblies shared accross appdomainsI did some testing and for a script similar to the 1+1;; in the issue report I ran fsi with and without shadowcopyreferences enabled, with and without MultiDomainHost enabled a few hundred times the table below is the average times of each set of runs. In all cases Fsharp files were ngened and loaded from their standard VS install locations.Without MultiDomainHostWith MultiDomainHost/shadowcopy-/shadowcopy+/shadowcopy-/shadowcopy+56840.58411118600.172961529.9377471692.79377As you can see the impact of shadowcpy is much smaller, close to without. The extra work here is due to creating a new appdomain so the devel it can be unloaded.MultiDomainHost causes static fields to be indirected and so there is a small degrade on with/without. The timings were done on a dualcore VM on a server that was not doing any other work. (changeset 1338154)1 parent844fc51 commit09e5eb5
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2341 | 2341 | | |
2342 | 2342 | | |
2343 | 2343 | | |
| 2344 | + | |
2344 | 2345 | | |
2345 | 2346 | | |
2346 | 2347 | | |
| |||
0 commit comments
Comments
(0)