[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] ExternalEventCheck selects w/100us timeout

From: John Gilmore
Subject: Re: [Gnash-dev] ExternalEventCheck selects w/100us timeout
Date: Thu, 05 Aug 2010 19:13:05 -0700

>   We could drop the select(), or reduce the timeout, but as this is a
> reasonably new feature, I seriously doubt it's been a big performance
> problem.

If this code is only called 50 times a second or something (whatever
the frequency of the main loop is), then it should just poll the file
descriptor with select or FIONREAD.  It appears to do the FIONREAD
anyway, so might as well entirely remove the select.

When no packet is there to process, there isn't any reason to delay
the rest of gnash by 100 microseconds.  Even if the kernel was good at
using such tiny delays, which it isn't.

If this code is called more frequently than that, it should probably
use the main select() loop (and create a main select() loop for the
framebuffer GUI, there are good reasons why every other GUI does this).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]