Dual pane sort-order instability issue

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Dual pane sort-order instability issue

Post by prino »

This isn't really a bug, but it indicates that something is interfering with something else...

In a dual pane configuration where all files in the second pane all have exactly the same created/modified/accessed timestamps, changing any time stamp of any file in the first pane, even to itself, causes a change in the order of the files in the second pane.

Actually, this also happens when the first pane displays another directory...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

Sounds like a quicksort artefact: there are sort tasks with more than one correct solution, and it's determined by the initial conditions which of the possible outcomes actually comes out.

But I fail to reproduce the issue. There are so many factors in XY controlling the sort order...

So, for starters: HOW do you timestamp?

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

admin wrote:So, for starters: HOW do you timestamp?
Select all files in the directory and then set all times (created/modified/accessed) to the same time in the properties panel.

I have two panes open, one with this particular directory (pane 2), one with another (pane 1).

Once all files in pane 2 have the same timestamps, I go back to pane 1, click on any file, click on any date in the properties pane, just click the green V and the order in which the files in pane 2 are displayed changes.

Also, as I just now found out, selecting other directories in pane 1 on occasion changes (as in removes) the secondary sort order of pane 2!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

What about the sort order of the affected listings?

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

admin wrote:What about the sort order of the affected listings?
Columns for both panes:

Name/Size/Type/Modified/Attr

Sorting order pane 2: Primary "Modified" ascending, secondary "Type" descending

Case 1:

Sorting order pane 1: Same as pane 2. "Changing" (even to the same) any date on this pane will cause the files in pane two to be sorted in a different order, but primary and secondary sorting orders are not changed! FWIW, it only affect two groups of files, those of type "h-h" and those of type "rtf".

Case 2:

Go up one level in pane 1, to a directory with a single sorting order, "Name" ascending, and pane two will now also be sorted "Name" ascending. Restore the saved "Active Folder View" of pane 2 to what it was, "Mod" a/"Type" d, and pane 1 will get the same sorting order, so in this case the panes do not seem to be independent.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

IMO you could have mentioned right away that the pane in question was secondarily sorted... :roll: :whistle: ... would have saved 15 minutes of my saturday afternoon.

Turns out my first guess was right: these are quicksort artefacts, cannot do anything about it. Especially so short before the game. :biggrin: :biggrin: :biggrin: BTW, it's no coincidence that most icons here a black and yellow! :biggrin:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

I could also put it this way: This is one of the small prices you pay for XYplorer being the fastest of all file managers.

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

admin wrote:I could also put it this way: This is one of the small prices you pay for XYplorer being the fastest of all file managers.
When you've got a machine that is fast enough to run z/OS, the difference between 1 ms and 1.1 ms is irrelevant. :mrgreen:

So let's forget the instability that's inherent to Quicksort, which leaves just the question, "Why does sorting one pane, or changing pane to a directory with another sort order also change the second pane?"
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

Good question. The nonactive pane should only be refreshed when it's the same path as the active pane. I could reproduce your issue only with both panes pointing to the same path. :?

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

admin wrote:Good question. The nonactive pane should only be refreshed when it's the same path as the active pane. I could reproduce your issue only with both panes pointing to the same path. :?
They are in the same path. Remains the question, "Why do something that's not required?" causing you to loose some precious nano-seconds :lol:
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

prino wrote:
admin wrote:Good question. The nonactive pane should only be refreshed when it's the same path as the active pane. I could reproduce your issue only with both panes pointing to the same path. :?
They are in the same path. Remains the question, "Why do something that's not required?" causing you to loose some precious nano-seconds :lol:
No, in that case it IS required. The modified date is displayed in the list, so the list needs to be updated.

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

I've now looked at your "same path" statement, but does that mean that when pane one contains "D:\02-IBM\" and pane two "D:\01-lift\vp\test\base\", they are, by virtue of sharing the same drive, on the same path?

Because going down from "D:\02-IBM\" to "D:\02-IBM\01-Hercules\20130524-Hercules\" changes the sort order of pane two twice, first to that of "D:\02-IBM\01-Hercules\" and subsequently to that of the 20130524... directory.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

Could it be that you enabled Sync Scroll (menu Panes)? :whistle:

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Dual pane sort-order instability issue

Post by prino »

:oops:

Maybe in that light a suggestion, if the user changes the directory in a pane, automagically switch of sync scroll - I remember having used it, but that's at least a month ago when I was doing a compare of "D:\02-IBM\01-Hercules\20130419-Hercules\" with its predecessor.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dual pane sort-order instability issue

Post by admin »

prino wrote::oops:

Maybe in that light a suggestion, if the user changes the directory in a pane, automagically switch of sync scroll - I remember having used it, but that's at least a month ago when I was doing a compare of "D:\02-IBM\01-Hercules\20130419-Hercules\" with its predecessor.
Seems to make sense, but maybe somebody wants is permanently? hard to say...

Post Reply