On Tue, 1 Mar 2016 05:20:56 +0100 Cedric BAIL <cedric.b...@free.fr> said:

> On Tue, Mar 1, 2016 at 4:11 AM, Carsten Haitzler <ras...@rasterman.com> wrote:
> > On Mon, 29 Feb 2016 18:10:02 -0800 Cedric BAIL <cedric.b...@free.fr> said:
> >> On Feb 29, 2016 17:46, "Carsten Haitzler" <ras...@rasterman.com> wrote:
> >> > On Mon, 29 Feb 2016 18:45:15 +0000 Tom Hacohen <t...@stosb.com> said:
> >> > > Yes, I already told him that on IRC. The cost of caching is most likely
> >> > > higher than the cost of calculating every time, and anyway, it's rare
> >> for
> >> > > an object to need to have information about the mainloop, adding a
> >> cache on
> >> > > every object is a bad idea, calculating on creation is the way to go.
> >> >
> >> > you mean on parent_set (not on creation) and do this for every object
> >> that has
> >> > to know about loop (timers, fd handlers, etc. etc.)?
> >>
> >> Yes, but parent set is called at creation time automatically to set the
> >> parent. Only one place to handle it.
> >
> > you can do a parent_set later on... :) it is possible. i see no reason why
> > it should work to:
> >
> > 1. o = eo_add(class, NULL);
> > 2. eo_parent_set(o, loop);
> >
> > just pointing out that ASSUMING it is on creation might lead to bad/poor
> > implementations/code. :)
> 
> Well, I was pointing out that there is no technical difference between
> eo_add(class, loop) and eo_add(class, NULL, eo_parent_set(loop)). In
> both case, it will call exactly the same path and behave the same way.
> Arguably we could be silly and do a parent_get in the finalize
> function, but that would basically just break apart at some point. So
> if we need to get the loop object, better just handle that in
> eo_parent_set.

precisely what i said. as opposed to handle "on creation" :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to