View Single Post
  #4 (permalink)  
Old August 30th, 2008
GregorK GregorK is offline
Phex Developer
 
Join Date: May 9th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

Actually the synchronized use in BandwidthController is crap. Since the it would only ensure locking on the reference to TransferAverage, which is not critical. But what is more critical is the internal data of TransferAverage. The access to values[] is TransferAverage is the more "critical" section. But since all this bandwidth use is a more or less approximately calculation anyway, the differences through missing synchronization is likely irrelevant.

A event concept is a nice idea. I just fear it could generate a huge load of events. Basically each read/write operation would cause a new event to be fired. Most of them likely being ignored.

The UI is updating every 2 seconds currently, so this should ideally already provide limited access to the underlying data. I could be wrong with that though.. I just assume it.

I added some modifications to SVN, would be nice if you could test how those behave for you.

Gregor
__________________
Reply With Quote