Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 5809] Column sorting with the new packet list doesn't do s

Date: Thu, 7 Apr 2011 20:22:42 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5809

Guy Harris <guy@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|when Using "Protocol"       |Column sorting with the new
                   |column to Sort,wireshark    |packet list doesn't do
                   |donot really sort -_-       |stable sorts

--- Comment #4 from Guy Harris <guy@xxxxxxxxxxxx> 2011-04-07 20:22:39 PDT ---
It "really sorts" if the column by which you're sorting ends up sorted.  All
the values in the protocol column are the same, so it's trivially "really
sorted".

It *stably* sorts if rows with equal keys are in the same order after the sort
than before the sort:

    http://en.wikipedia.org/wiki/Sorting_algorithm#Stability

so the problem is that the sort isn't stable.

And, in fact, GTK+'s GtkTreeModelSort does not guarantee a stable sort:

    http://developer.gnome.org/gtk/stable/GtkTreeModelSort.html

"Description
The GtkTreeModelSort is a model which implements the GtkTreeSortable interface.
It does not hold any data itself, but rather is created with a child model and
proxies its data. It has identical column types to this child model, and the
changes in the child are propagated. The primary purpose of this model is to
provide a way to sort a different model without modifying it. **Note that the
sort function used by GtkTreeModelSort is not guaranteed to be stable.**"

It may be possible to make the sort stable; it might require a sort function
different from the one used by GtkTreeModelSort.  I can make no guarantee that
it is possible, or, if it is, that somebody will do so soon, the setting of the
Importance: field nonwithstanding (most if not all of the developers have lives
and other projects, both in Wireshark and elsewhere, on which they're working),
so you may be stuck with 1.2.x for a while.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.