Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09e5eb5

Browse files
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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/fsharp/fsi/fsi.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,6 +2341,7 @@ type internal FsiEvaluationSession (argv:string[], inReader:TextReader, outWrite
23412341
// Mark the main thread as STAThread since it is a GUI thread
23422342
[<EntryPoint>]
23432343
[<STAThread()>]
2344+
[<LoaderOptimization(LoaderOptimization.MultiDomainHost)>]
23442345
letMainMain argv=
23452346
ignore argv
23462347
letargv= System.Environment.GetCommandLineArgs()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp