On Tue, Nov 9, 2010 at 3:04 AM, Carsten Haitzler <ras...@rasterman.com> wrote:
> On Tue, 9 Nov 2010 14:29:23 +1000 David Seikel <onef...@gmail.com> said:
>
>> On Tue, 9 Nov 2010 11:52:04 +0900 Carsten Haitzler (The Rasterman)
>> <ras...@rasterman.com> wrote:
>>
>> > stupid goal to "get more fps" just for such benchmarks. there is no
>> > POINT going faster than the screen refresh. you lose frames. in real
>> > life you want no MORe frames per second than the animator framereate
>> > - regardless of "benchmarking". if you want a "benchmark mode" where
>> > all this frame limiting stuff is dropped and it just spins and draws
>> > as fast as it can - sure, but for an actual "use this in real life"
>> > library you want it to simply respect the animator framerate and not
>> > bypass it because someone has a benchmark bee in their bonnet.
>>
>> Inversely, you do want the time taken to calculate each frame to be as
>> small as possible, so that you have more time available for other
>
> correct - but thats a separate matter. benchmarking (ie getting as high an fps
> value as u can when running in a tight loop) is a way of doing this and seeing
> it get better (fps goes up). but its a benchmarking thing - not a "runtime 
> real
> life use" thing. that effort to reduce time taken to produce a frame ends up
> keeping more cpu for other things indeed.

Small example that exposes the problem inside ecore:

A timer callback sleeps for 3 seconds, then add another timer and
returns FALSE. The new timer is added with an interval of 0.001
seconds, but is just called after another 3 seconds.

>From my point of view, the problem is in _ecore_timer_next_get(),
which should use ecore_time_get() instead of ecore_loop_time_get() to
get the current time. Actually, it should probably use
ecore_time_get() when the timer was added with ecore_timer_add(), and
use ecore_loop_time_get() when the timer in the "first" variable was
added with ecore_timer_loop_add().

What do you think?

-- 
Rafael Antognolli
ProFUSION embedded systems
http://profusion.mobi
#include <Ecore.h>
#include <stdio.h>
#include <unistd.h>

#define INTERVAL 0.001

static Ecore_Timer *_timer = NULL;

static Eina_Bool
_timer_cb(void *data)
{
    fprintf(stderr, "p1\n");

    sleep(3);

    fprintf(stderr, "p2\n");
    _timer = ecore_timer_add(INTERVAL, _timer_cb, NULL);

    return EINA_FALSE;
}

int
main(int argc, const char *argv[])
{
    ecore_init();

    _timer = ecore_timer_add(INTERVAL, _timer_cb, NULL);

    ecore_main_loop_begin();

    ecore_shutdown();
}

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to