Build .NET / ngen / jit cache to warm up and cool down

I have an Input Method (IME) created with a C # .NET 2.0 DLL via C ++ / CLI. Since the IME always binds to another application, the C # .NET DLL doesn't seem to be able to avoid re-setting the image address.

Although I used ngen to build my own image of this C # .NET 2.0 DLL and installed it in the Global Assembly Cache, it didn't improve much, in about 12 seconds. up to 9 seconds. on a slow PIII PC.

So I'm using a small application that loads all the components referenced by the C # .NET DLL at load time to "warm up" the DLL's own image. It works great to speed up load times by up to 0.5 seconds.

However, it only worked for a while. About 30 min. later, it seems, will "cool down" again.

Is there a way to control the behavior of the GAC or self-image to be always hot? Is this a problem with an image access problem?

+2


source to share


1 answer


I think everything that could be a framework library and the CLR itself is in the Windows cache.

You might find that a tiny application that just sat in the background, perhaps writing bytes to a file every time (or some other pointless task that would provide enough activity to keep all the corresponding files loaded in the cache) is enough to everything was "warm".



It would at least be worth a try - it doesn't take long to write.

0


source







All Articles