[m-dev.] For review: another change to the external debugger

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jul 27 20:10:51 AEST 1998


On 27-Jul-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> > I'm not sure I believe this rationale.  What makes you think that
> > testing whether or not an attribute is wanted is going to be more
> > expensive than sending it across a socket?
> 
> My intuition: do not perform the test is more efficient then performing
> it.

My intuition is that the costs of sending something across a socket
far outweigh the costs of a test.

> The size of the message send to the socket is roughly the same, if
> not smaller.

If the size is roughly the same, then I would not consider it worth
making this change -- after all your change makes the interface
a bit less orthogonal (i.e. more complicated).

If the average size is smaller, then it may be worth making the change.

> For example if you consider a request where only the
> chronological event number is wanted, which is the worse case with my
> method:
> 
> [deb -> mercury] current(yes, no, no, no, no, no, no, no, no, no). 
> [mercury -> deb] current(yes(3), no, no, no, no, no, no, no, no, no).
>
> [deb -> mercury] current_slots. 
> [mercury -> deb] current_slot(3, 3, 2, exit, "module_name", "pred_name",
> 3, 0, 0, "").
> 
> it's still taking less place.

Ah, now you're talking!

Yes, it looks like your method will result in less socket traffic.
That is a reasonable rationale.

> > It may well be that your change does improve efficiency.
> > But if so, the rationale given above does not explain it.
> > So you need to come up with a more convincing rationale.
> 
> What about:
> 
> There are 2 parts in this change (1) do not test whether or not an
> attribute is wanted to retrieve it and (2) make the retrieval of
> arguments and other slots done separately. The rationale for (1) is that
> this test is very expensive (11 attributes times possibly millions of
> events)

This is wrong; the test is not very expensive.
The 11 tests are done only only after each request on the socket,
not for every event.
Sending things across the socket is far more expensive than a test.
(If you're sending millions of requests across the socket, then
a few million tests won't make a significant difference.)

> and it does not allow to reduce (when not increase)
> significantly the size of messages sent to the socket.

I couldn't parse this sentence.

Anyway, do you want to have another go at writing a rationale?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list