Re: [Linux-wildo-devel] dataserver packets
Status: Pre-Alpha
Brought to you by:
darkschneider2
|
From: Benjamin P. <Ben...@ar...> - 2007-03-09 17:15:47
|
Hi, Gabriele Dini Ciacci wrote: > [A ... B ... C] > A big note is that I have NO idea of which is faster or less resource > consuming, and I would like to hear opinions of everyone on that. > > The other BIG note is that those functions are called very often, > probably about every 20ms and we want them to be fast. Instantiating a > class that managed the packet itself instead of a struct looks to me a > bit too slow. > > > Currently I like idea B/C, C allows us to go on with current code more > easily cause the modifications touch a few the structure, (you just call > a different function after setting up the chain that is anyway done in > some new function). > I would say to go with C, it is the solution I would have thought of and it is most flexible and OOP like. There is also the possibility to disable filters temporarly and change the whole set of filters easily by changing the "filterManager" (TM). I don't think you need to change the filters a lot. But a good thing if you are concerned about speed is to implement some buffering to the whole wildo structure. If there is data for about a half second buffered the codec, filter and network transport wouldn't be used that frequently and the overhead for virtual methods becomes marginal. But it is also something we could do when the application is a bit more stable. regards, Benjamin Peter |