Re: Gtk2::Simple::Tree (preview)



Carl Nygard said:
On Thu, 2004-04-15 at 16:15, A. Pagaltzis wrote:
* Ross McFarland <rwmcfa1 neces com> [2004-04-15 20:41]:
yeah, but having 10 ways to do stuff isn't always a good idea.
(heh)

And sometimes it is. ...

I'd agree with Ross here, I don't think it's a good idea to be
maintaining too many ways to access the same info. ...

i think the line is "would you rather have ten equally broken ways to do it,
or two reasonable ways?"


my first thoughts are that the tied interface would actually be
just as fast if not faster

Tieing adds OO method lookup overhead *and* tie magic overhead on
top of that. It can never be as fast as something along the lines
of passing a path or an index list.

But you'd have to parse out the path, which is overhead itself.
Besides, the tie'ing procedure might prebind the functions, so there
wouldn't be as much as you think.  It's debatable enough that I'd
reserve judgment until someone ran benchmarks.

tie method invocation involves marshaling, and nearly all gtk2-perl functions
involve marshaling.  the tied stuff compounds that.

if we go to using accessor methods to get data in and out of the tree at
paths, then the tie is, well, pretty much unnecessary.  a list of lists
structure could be used to represent the data when going in and possibly
dumping out.



-- 
muppet <scott at asofyet dot org>



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