<snip />

> "Just because they're not displayed doesn't mean they're not in the data
> set - the dump you sent me pretty clearly shows that they ARE there."
>
> EXACTLY, EXACTLY, EXACTLY, EXACTLY - If you have the logic not to
> display them then surely you have the logic not to sort them!!!
> If they are not going to be used in the output then they should
> not be included in the sort!!  First rule of Sorting - I learnt
> this back in 1979 doing a Computation degree at Manchester University.

<snip />

Maybe in a perfect, deterministic world.  ntop is neither...

Two problems ---

First, that assumes that the criteria for the sort is available ahead of
time.  Which is not always true - top 10% for example.  Or, in the case of
ntop, when the resolution thread resolved the name (changing the
symHostIpAddress value) during the sort.  Rare?  Yes.  But it can happen.
That case is solvable just by clicking to resort and that's the best (only)
answer there is.

Second, if we create a large table extracting values from the whole, we need
memory to store that extract.  Which is the better use of a limited
resource - storing a few additional hosts or sorting less data?

What was true in 1979 is no longer necessarily true.  Your 'rule' is based
on an assumed relationship between processor and memory speed.  With large
(but finite) caches and much faster processors than memory, it can be more
efficient to do a few extra compares of data already in cache, vs. walking
the whole of memory an extra time.  This is ESPECIALLY true when ntop starts
to run out of memory and begins to use swap space.



-----Burton

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to