[ENet-discuss] CPU Usage

Nicholas J Ingrassellino nick at lifebloodnetworks.com
Mon Sep 27 13:33:41 PDT 2010


This just inspired me to do another test.

I am now only sending 1 out of every ~10,000 pixels. It still takes 
about half of one second to receive ~50 pixels (7 byte packets per 
pixel). All the CPU usage is on the client, not the server. I am very 
familiar with this graphics library (Allegro) having used it many times 
before. If I receive, discard the packets, and do not render the pixels 
my CPU usage remains at ~100% leading me to believe it is 
/enet_host_service()/ and not something having to do with rendering data 
onto the screen.

Is ~350 bytes split into ~50 unreliable, unsequenced packets still too much?

------------------------------------------------------------------------

Nicholas J Ingrassellino
LifebloodNetworks.com <http://www.lifebloodnetworks.com/> || 
nick at lifebloodnetworks.com <mailto:nick at lifebloodnetworks.com>

"The idea that I can be presented with a problem, set out to logically 
solve it with the tools at hand, and wind up with a program that could 
not be legally used because someone else followed the same logical steps 
some years ago and filed for a patent on it is horrifying."
- John Carmack on software patents


On 09/27/2010 03:31 PM, Kenneth Bull wrote:
> On 26 September 2010 20:35, Nicholas J Ingrassellino
> <nick at lifebloodnetworks.com>  wrote:
>    
>> My disclaimer in my first message was meant to pose this as an experiment.
>> This is a proof of concept kind of thing and nothing more. The idea is to
>> develop an alternative to sending hold frames (or only the deltas). Much
>> like VoIP does not suffer from some missing data I want to do a little work
>> on how much an image would suffer from the smallest discrete unit (a pixel)
>> missing unexpectedly. Look at my experiment as anything other than
>> academic-- or a what if-- and you miss the point.
>>      
> It would probably be better to simply simulate that sort of loss,
> especially for early development, rather than using the loss that
> naturally occurs with an unreliable stream.
>
> Something like this:
>
> for (int i = 0; i<  num_pixels; ++i)  {
>    if (rand() % 30<  1) {  /* drop one pixel in 30 pseudo-randomly */
>      continue;
>    }
>    do_stuff_with _pixel(i);
> }
>
> This also allows you to simulate different amounts of loss.  You might
> want a better rand() function than the standard though.
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100927/b6db77cc/attachment.html>


More information about the ENet-discuss mailing list