Closed Bug 884436 Opened 7 years ago Closed 6 years ago

Sorting by METHOD is really painful

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: Optimizer, Assigned: vporof)

Details

Attachments

(1 file)

It does sort by method, but all the GET/PUT/POST/DELETE calls keep shufflign amongst each other each time a new entry is added :/

This causes full tool invalidation and flickering and jumping and hard to locate one thing and hard to debug things scenarios.

Is that angry enough ? ;)
We should always take timing into consideration when sorting. For example

> _byMethod: function({ attachment: first }, { attachment: second })
>   first.method > second.method,

becomes something like 

> _byMethod: function({ attachment: first }, { attachment: second })
>   first.method == second.method
>     ? first.startedMillis > second.startedMillis
>     : first.method > second.method,

Some goes with other predicates I guess. You could work on this Optimizer if you'd like. If not, I'll take a look at it at some point if nobody beats me to it.
Priority: -- → P3
(although do note that I can't reproduce this, but you're probably right)
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attached patch net-sort.patchSplinter Review
Attachment #801727 - Flags: review?(rcampbell)
Comment on attachment 801727 [details] [diff] [review]
net-sort.patch

Review of attachment 801727 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/netmonitor/netmonitor-view.js
@@ +620,5 @@
>      first.startedMillis > second.startedMillis,
>  
>    _byStatus: function({ attachment: first }, { attachment: second })
> +    first.status == second.status
> +      ? first.startedMillis > second.startedMillis

you could just reuse _byTiming for this and subsequent else expressions. If you didn't mind the extra send.
Attachment #801727 - Flags: review?(rcampbell) → review+
https://hg.mozilla.org/mozilla-central/rev/00e62d664a9c
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.