[Embedlets-dev] Making progress on the TINI....
Status: Alpha
Brought to you by:
tkosan
|
From: Andrzej J. T. <an...@ch...> - 2003-03-07 03:42:18
|
It was bugging me, so I did some investigation, and found that one particular operation was killing the TINI performance, and that was accessing various component property values during the event propagation process. I refactored that so that Components (eg. Embedlets) cache their static values in instance variables (things like the unique ID, description, version, etc.) and also refactored how Lifecycle state was get/set in a similar manner. Here were the results, comparing async and sync event propagation (all values in events/second) before and after the refactorings: PLATFORM ASYNC SYNC (Recycled) SYNC (Non-Recycled) TINI (before): 8 13 143 TINI (after): 12 71 133 As you can see, the Async speed improved by 50%. The Sync speed using recycled event instances (so only one is ever created) was markedly improved by the refactoring. The Sync (Non-recycled) slowed down a trifle due to some other refactoring that I put in place to improve the Embedlet spec interfaces a bit, but the net loss in speed was only about 7% (and those structural refactorings were necessary). I figure the SYNC (Non-Recycled) is running about as fast as the poor TINI can go, and though there might be some minor tweaking that could possibly help a bit, that's about all she wrote. With the new refactorings, the SYNC (Recycled) path is probably approaching optimum as well. However, the Async is still quite disappointing. Sure it's using threads and thread context switches, but I think it should be a bit closer to the SYNC (Recycled) performance. My gut feel is that this can probably be improved a fair bit by optimizing the queue structures (away from generic Vectors and Hashtables to more customized versions that are specifically tuned to the access patterns that async event propagation produces). So there is still lots of room there I think. Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |