Tips for improving Service performance on CE devices (or any constrained system)
Some of the CE platforms we support, like the ICOP eBox 2300 and some PDAs, are constrained in both CPU and memory, and significanly slower (like 50x) compared to a modern desktop system
What we had to do on CE, and you can see this in the iRobot lite service, is take a whole bunch of individual services and coalesce them into one service, to minimize the service->service messaging. This means that you have a “lite” set of services (which work on both CE and desktop ofcourse) and then your normal set of services, with clear seperation of logic. We don’t think that is really bad to merge things, since if you are constrained for performance, purity of design takes second place.
So to summarize:
1)Carefully look at all your services and minimize service->service messages. You might be doing stuff that is inefficient from a protocol perspective and you were getting away with it on XP. For requests you don’t need responses, set the ResponsePort == null on an outbound request. It will double your message throughput!
2)Look at your service code for any debug spew (remove it in the fast path, release builds!) and any large copies or allocations on the fast path
3)If 1,2 does not cut it, merge services and use multiple AlternateContractPorts to make a single service appear as multiple, allowing you to have the logic within one service, communicate fast using CCR ports (not forwarders), but still look to the outside world as separate, logically separate services
4)If you have timers, make sure you don’t have tight loops that fire too fast for the device

