I’m back from the Embedded DevCon and I’m working on a new test project idea (true real-time managed code – more on that later). In doing so, I’ve added some more to the SDF source. Using Alex Yakhnin’s MSDN Article as a base, I’ve added a ToolHelp namespace with a ProcessEntry class to the SDF. You can actually create a real Process Viewer (not the crap “running programs” in the PPC) with essentially 2 lines of code beyond the UI work:
To show the processes in a ListBox:
myListBox.DataSource = OpenNetCF.ToolHelp.ProcessEntry.GetProcesses();
To kill a selected process in the list:
Once again, I love managed code!
Ask anyone that knows me and they’ll say I’m pretty modest about my programming abilities – almost to a fault (it’s making finding a new job or contract work right now a bit difficult), but this paper really excites me. Basically it’s the preliminary results of a set of Serial benchmark tests that include the OpenNETCF implementation, and we’re way, way out in front.
Of course I’m not solely responsible for the OpenNETCF.IO.Serial library but I did architect it and put a lions share of the code into place (though Udo has been doing a hell of a lot lately as well). It turns out that our code has latencies that are orders of magnitude less than a commercially available package. For example, the OpenNETCF library has a latency of around 1ms running on XP, where the commercial library is over 100ms! The tests gave similar results on two separate Pocket PCs as well.
We didn’t have any input or influence on the tests – in fact I wasn’t even aware they were being done, so we did no tweaks or fixes to improve the results, these were straight out of the box. I’d be interested to see the same tests run on some other libraries, including the upcoming implementation in CF 2.0. It goes to show you don’t always get what you pay for.
As a side note, I’ve got to give kudos to the Microsoft developer that wrote the Queue class. When I implemented the FIFO in the Port class, I used a Queue, but was concerned about possible performance problems (just look at the comment I put in the code). This test pretty much removes any doubt in my mind about it’s performance. I’m positive it’s done as a basic linked list, but it’s still really heartening to see things work so well.