[Top][All Lists]

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

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

From: Rob Savoye
Subject: Re: [Gnash-dev] ExternalEventCheck selects w/100us timeout
Date: Wed, 04 Aug 2010 22:23:11 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2 Thunderbird/3.1.1

On 08/04/10 21:55, John Gilmore wrote:

> I'm having trouble figuring out why ExternalEventCheck is polling with
> select() and a very short timeout every time around the movie_root
> loop to see if a browser wants to talk to it over a file descriptor.

  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. There is a check to see if there are bytes in the network
buffer using FIONREAD, so since it's just polling, that would achieve
the effect. I haven't noticed any real change in CPU load when I added
this select().

> Shouldn't this file descriptor be included in the global select or
> poll arguments that determine whether ANY I/O or timeout is ready?
> There should be zero need to poll this file descriptor.

  Because it has to work with all the GUIs, including a framebuffer,
which doesn't have a builtin event loop.

> Fixing this will eliminate a bunch of the CPU burning in current
> trunk.  However, since this code appears to be new since 0.8.7, it
> won't fix the CPU burning behavior of gnash, all by itself.

  No, the real problems in Gnash are much deeper. Part of the problem
was adding video, as it was hacked into Gnash, but Gnash should have
actually had more substantial refactoring to support video.

        - rob -

reply via email to

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