Friday, January 30, 2004

One of my wild google searches today have returned this jem: Compact Framework Architecture. This is a presentation by Frank Perchel-Galee which reviews a CF architecture. The most interesting slides for me are the ones that show the memory pools in the CLR. There 3 memory pools allocated: Metadata Cache, JIT Cashe and GC Pools. Memory reclaiming by GC is happenning in 3 phases:
Phase1: Mark and sweep
Phase2: Compact whatever is left
Phase3: Flush JIT Cache

That could mean that if your program requires quite a lot of memory to run, the once JIT'ed code could be flushed and would force JITer to kick in again for the code that's already been JIT'ed. One more interesting bit from one of the slides says that the compile time of JIT compiler is LINEAR to length of the method. This leads to immediate conclusions that if you want to get a good performance from your CF app, try to brake your long winded methods to a few shorter ones. It could save you some time during execution...

 

Oh and don' forget this MSDN article Writing High Performance Managed Applications. Most of the stuff mentioned there is applicable to CF too.

1/30/2004 2:02:55 PM (GMT Standard Time, UTC+00:00)  #     |