Khronos: A Plugin for Ageing Gracefully

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Apr 01, 07:25

Answer the Shorter:

You cannot sort by plugin columns, ever. Not just this plugin, but any of them. In this case, the simple workaround is to just sort by modification date, and you'll find the Age column responds accordingly.

Answer the Longer:

The reason that custom columns cannot be sorted is to be found in the way information is extracted for display. From the user's point of view, he just assumes all information is gathered at once in the background and then presented for his amusement... but the reality is a little different.

It's a type of Catch-22: in the interests of saving spurious processing, custom columns are processed only when, and only if, the item itself is made "visible". What this means is that items which have not yet been scrolled into view (and are currently off-screen) will not be processed until they actually are scrolled into view. :shock:

This appears to be part of the design of Total Commander plugins in general, as they behave the same in TC as they do in x2.

"That sounds like a silly excuse to me - are you some kind of politician? My mother always said I should only believe in what I can see, not just what people tell me, so show me the proof!"

Luckily for me, Khronos provides a simple means of demonstrating this:

1. Hit <Ctrl+Alt+K> and go to the "Event Log" tab.

2. Tick the box for Topmost Window, and set Logging to Verbose. Do not close the settings window, but instead click back into x2 so you can see both windows on the screen at the same time.

Now navigate to a folder which contains many subfolders, more than will fit onto the screen at once. The "Event Log" will display the timing messages of the processed items - those that are actually visible at the moment, and then it will stop. You will notice though, that if you scroll down (within x2) to view other "off screen" folders, the event log then jumps into action again displaying new-item processing as they become visible.

This is not some trickery on my part, this is just how content plugins work. There is no exposed callback function within the plugin API that will allow post-partum sorting - in the time honoured tradition of what Americans would call "passing the buck", we can blame Nikos for this, and Nikos can, in turn, just blame Christian Ghisler (the creator of TC).

Ultimately, this means that when you click on the column-header for any custom column, x2 tries to sort it (by text only), but it can't have all the information necessary (since invisible items have blank-columns), and so you end up with scrambled eggs. :shrug: Occasionally you can end up with results which "appear" to be sorted, but they actually aren't: like everything else in this realm of tears, it is nothing but an illusion. :sad:

Quod erat demonstrandum.

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Khronos: A Plugin for Ageing Gracefully

Post by dunno » 2017 Apr 01, 08:37

aha, got it thanks.
my apologies for disturbing your therapeutic gardening with ignorant questions.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Apr 01, 09:22

That was a perfectly legitimate question, and a significant one, considering that the principle isn't explained anywhere else in plugin API documentation and Nikos just mutters incoherently under his breath about God, the Devil, and the Circles of Hell when the issue is raised - in fact, I had to discover it on my own, to great mirth, surprise, and consternation. :shrug:

Thankfully in the case of this plugin, the workaround is a simple one (the Age column is intended to complement the date-modified column, not replace it). For other plugins, there would effectively be no solution. (That's not entirely true, as the plugin API does provide a mechanism of sorts for this, but Nikos, in his [lack of] wisdom, did not choose to implement it.)

I was also pleasantly reminded of a 1973 educational Swedish television show for children called Fem myror är fler än fyra elefanter which means "Five ants are more than four elephants", in that since columns are sorted literally (by default), in the case of Age there's no way for x2 to be figuratively aware that 5 seconds is less than 4 hours. QED: Computers are stupid.

x2 could learn a lot about relativity from watching more children's television. :biggrin:

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Khronos: A Plugin for Ageing Gracefully

Post by dunno » 2017 Apr 01, 10:45

I've learnt plenty from "The Magic Bus", must be a child. One thing it didn't cover was parallel universes but from my hammock I deduced that one doesn't have to know "String theory", relativity or gaze into the heavens to derive parallel universes as right here on earth exist many parallel universes, just ask a cat..... :beer:

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Apr 01, 18:07

dunno wrote:
2017 Apr 01, 10:45
...to derive parallel universes...
On the other hand, depending on Who's driving in parallel universes (that is to say, Swindon), you will begin to understand why multi-threading makes String Theory and Relativity look fairly commonplace next to the real Magic Roundabout. :wink:

Toss your neighbour's nebulous cats into the middle of that and watch them sort out the proper order of escapism. :twisted:

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Khronos: A Plugin for Ageing Gracefully

Post by dunno » 2017 Apr 02, 03:04

About parallel universes.
Is there a difference between AMD's and Intel's methods of dealing with Multy'Hyper threading, or are they the same "verse" with different labels ?, it would be very lame if they're both shovelling shit in a identical manner. does Intel have a advantage over AMD with multi and hyper threading ?.
Last edited by dunno on 2017 Apr 02, 04:35, edited 1 time in total.

Tuxman
Platinum Member
Platinum Member
Posts: 1483
Joined: 2009 Aug 19, 07:49

Re: Khronos: A Plugin for Ageing Gracefully

Post by Tuxman » 2017 Apr 02, 04:12

AMD and Intel have different priorities on single vs. multi cores. They basically shovel their shit on different piles.
Tux. ; tuxproject.de ; Windows 10 x64
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Khronos: A Plugin for Ageing Gracefully

Post by dunno » 2017 Apr 02, 04:42

So, stick with intel as everyone makes toilet paper for their shit ?.
(strange, this morning I have shit on the brain....)

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Apr 02, 09:20

Working on the theory that "a forum post should be like a woman's skirt: long enough to cover the subject material but short enough to keep things interesting", my answer's going to be roughly the same as Tuxman's, just with a more Victorian hemline flair to his 1960's "you're not going out in that!" approach. :D
dunno wrote:
2017 Apr 02, 03:04
Is there a difference between AMD's and Intel's methods of dealing with Multy'Hyper threading, or are they the same "verse" with different labels?
From a hardware perspective, when multi-threading is enabled, each core is given a principal-thread and an auxiliary-thread, where the former is granted the lion's share of IPC (Instructions-Per-Clock) and the latter is there to opportunistically leverage resources (such as branch-prediction) on the same core to help prioritise its principal-thread.

You can see this clearly in the following illustration, where I'm using WinRAR to archive a folder using a 4-core 8-thread processor. While the overall load (WinRAR spawned 67 of its own threads) is spread over all 4 cores, the main work for each core is in the principal thread, while attending (hardware controlled) auxiliary threads are only "chiming in" when they find something they can do to help their principals (which, in this case, isn't much :wink:). The processors can't run at their full load because the I/O latency in this case is disc-dependent (and subject to WinRAR's internal threading model filtered through Windows itself), but you get the idea:

Image

So, 2 "threads" in hardware terms is not the same thing as "2 threads" in software, and nor is it as "simultaneously" equivalent as it sounds.

Exactly how AMD and Intel do this differently tends to be hidden behind the usual "proprietary modelling"-speak, though AMD's latest Ryzen methodology has taken much of the shine out of Intel's 10-year dominance. :wink:

And before anyone complains that Windows never uses the full force of a CPU, if you run a specially designed stress-test (which simulates many different concurrent tasks such as Handbrake-rendering, multitasking, and image-editing), the processor is quite capable of giving its all, but really only under very specialised conditions:

Image

Ordinarily, Windows itself prevents this type of overload specifically to avoid the side-effects which can arise (massive heat-production and power-use), since most people's hardware is not capable of handling/dissipating it (laptops, etc) and so will just throttle-down in response to prevent damage.

But back on topic, it's very important to remember, though, that what Windows calls a thread (on the software-side) and what a CPU core calls a thread (as above) are two different things. When you see something advertised as "4-cores, 8-threads", or "8-cores, 16-threads" that's what the CPU is equipped with, though Windows erroneously simplifies this as either 8 or 16 "logical cores" and essentially uses its controller to prioritise "time-slicing" in a fairly hardware-agnostic manner. Time-slicing is more or less what it says on the tin: each running software thread is given a unit of time on a core-availability basis and either runs, is suspended, or swapped-out as necessary thousands of times per-second. It's more complicated than this, but that's the gist.

For example, just because you have a processor with 8 logical cores (in reality, 4 physical) that doesn't mean you're limited to utilising only 4 or 8 software threads - individual programmes can launch as many threads as they want (hundreds, if necessary), and the CPU controller cooperates with the Windows controller on allocating/balancing natural priorities and artificial affinities, but in the end it's the CPU that does the work and decides how it's really done. Windows is the "advisor" but the CPU is the "boss"; as in any complex management-system, advisors and bosses are often not necessarily the best at their jobs, but you still gotta dance with the one the one that brung ya.

If you really look under the hood, it's possible for CPU's to "migrate" software threads from one core to another (or even share them) during the lifetime of a single thread itself, depending on the resources its using (or is predicted to use) at any given time - this is where you get into the (more than just semantic) distinction between "Simultaneous" and "Symmetrical" thread-management, but that's for another day. :D
dunno wrote:
2017 Apr 02, 03:04
Does Intel have an advantage over AMD with multi and hyper threading?
Not any more, but it's more a money-thing. As above, the recent launch of the AMD Ryzen line has been a phoenix-from-the-flames, though in reality the balance is currently held where Intel has the better single-threaded performance by application (due primarily to its higher IPC rate), but AMD the better "heavily" multi-threaded; by "heavily" we're talking video-encoding, model-rendering, maths-heavy stuff - both can do it, but the jury is still out on who is most efficient at the auxiliary-thread methodology concept, never mind the resulting power-management (as in "performance-per-watt") effects.

For the end-user, that really boils down to Cost-per-Clock - at the high-end of the market Intel is (more or less) twice the price, without twice the gain. It's not that simple, but it depends on the workload you're likely to use, and the return you're hoping to see.

But no matter how the CPU is wired, if Windows itself struggles to prioritise the stuff you want (when you want it), you're not going to see much difference in the overall weather, regardless of which multi-national-corporate-entity-of-the-military-industrial-complex is poisoning the clouds or which way the wind is blowing them.

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Khronos: A Plugin for Ageing Gracefully

Post by dunno » 2017 Apr 02, 14:11

So it's down to the OS's.
Thanks for the man-splaining :wink:

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Oct 05, 11:53

Version 0.0.2.5 is now available (see links in original post at the top of this thread), bringing a few new features, efficiency improvements, bugfixes, etc. To update, just use the x2 Plugin Manager to disable the plugin, replace the file with the new one, then re-enable it. Any previously modified settings should carry over without any trouble.

As usual, I'm open to any complaints, calumniations, requests, and mudslinging as may entertain the masses. On-topic geeky-chit-chat would be welcome too, but as this is one of my less-popular projects (while ironically also being the one involving the most work), I'll settle for anything really. :wink:

Enjoy.
Changelog: 0.0.2.5 wrote:Added: Shell-Link ("Shortcut" *.LNK file) Correlation/Following (embedded %Env%-strings converted; separate config from reparse-points)
Added: Precision is applied on any final display component, not just in "Single" mode (set Decimal Places to "None" to disable)
Added: "Indicate Unverified Ages" option (Column Display) to prefix '~' to times of unprocessed/excluded folders
Added: Timeout for single-threaded ("Basic") processing (enable "Allow loose threads" for infinite)
Added: Event Log indicates new timestamps as being later/earlier than original by prefixing '+' or '-' to the delta string
Added: Event Log may be set as the "Default Tab" which opens first instead of the Settings Tab
Added: Explicit "Cancel" button (same as closing the plugin-dialog itself, for those unsure of expected close-button behaviour)
Added: Statusbar contains current number of trees (and subfolders) processed
Added: "Activity" tab to display real-time thread processing information (replaces previous unstable option on Event Log tab)
Added: On-demand processing of folders (Activity -> Parse Any Object)
- Targets will always be processed, regardless of Exclusions/Inclusions, Hidden/System checkboxes, Drive-types, Cache disposition, etc.
- Dropping folders directly into the Activity/Event-Log tabs or KhronosUI (as a toolbar button) will also parse the targets
Added: Dropping folders directly into Exclusions/Inclusions tabs will add those paths to the respective lists
Added: Version 7.1 of (MinGW) GCC tool-chain

Fixed: Link Correlation was unavailable if folders weren't being processed by content
Fixed: Thread priorities could be reduced before the timeout expired on "Highest" resource setting
Fixed: Subfolders beyond an explicit recursion-depth cap would mistakenly be considered as cached if subsequently browsed into
Fixed: Unaliased reparse-targets weren't independently cached if followed during recursion
Fixed: Mount-points didn't resolve GUID's to root letter-paths when unaliasing
Fixed: Event Log "Failures Only" entries were missing timestamps & deltas
Fixed: Hidden/System objects which were not set to be followed couldn't be correlated separately
Fixed: Attributes/Drivetypes of unaliased targets weren't properly validated
Fixed: Ouroboros loops weren't accurately detected under some conditions
Fixed: Bounds failure when importing 10-digit DWORD values from INI
Fixed: Root folders on excluded drives weren't themselves excluded
Fixed: Root folders from unaliased links weren't canonical (caused malformed paths during subsequent recursion)
Fixed: Topmost-window option wasn't retained in INI
Fixed: Timeout tracking could continue even after expiration
Fixed: Thread-exit states clarified to: Normal, Loose, Stopped, Abandoned, Timeout, and Thread Fault
Fixed: Thread abandonment/fault messages only added to log in Verbose mode (now they display under any mode)
Fixed: Bounding violations within Exclusion/Inclusion allocations
Fixed: Redraw corruption on subclassed-controls when UI was dragged partially off-screen
Fixed: Window controls in a tab could disappear if <Esc> was pressed while focus was in a multi-line edit control
Fixed: Minor UI issues (improved auto-focusing, edit-fields visibly reset to original values if abandoned as blank, etc)

Tuxman
Platinum Member
Platinum Member
Posts: 1483
Joined: 2009 Aug 19, 07:49

Re: Khronos: A Plugin for Ageing Gracefully

Post by Tuxman » 2017 Oct 05, 14:33

Doesn't the inclusion of "efficiency improvements" basically tell us that previous versions were not efficient; or are you a knight of the Order of Relative Efficiency which I have just imagined to exist and which religiously assumes that efficiency isn't binary?

Also, how is Version 7.1 of (MinGW) GCC tool-chain a feature, i.e. what are the relevant improvements for us mere users and how can we test that this chin, err, chain update actually changes anything for us?

edit: It looks like you made it harder to update than required, the previous version was named Kronos. I guess renaming Kronos.ini to Khronos.ini leads to adequate results? At least: Hooray, poorly documented WinAPI sources!
Tux. ; tuxproject.de ; Windows 10 x64
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Oct 05, 15:21

Tuxman wrote:Doesn't the inclusion of "efficiency improvements" basically tell us that previous versions were not efficient
Well, some memory allocations were... um... "over-provisioned", and multi-threaded applications are a royal patoot's-behind to make efficient on the first try. So, I made stuff "better". :wink:
Tuxman wrote:Also, how is Version 7.1 of (MinGW) GCC tool-chain a feature, i.e. what are the relevant improvements for us mere users...
I had been using the TDM GCC toolchain which was stuck on version 5.2 for the last few years, and GCC has obviously gone through some changes since then, especially in version 6. Exactly how well this sort of thing translates into the kind of sexual experience that kids can only dream about is anyone's guess, but compiler optimisations (some of which are applied to this DLL) can make or break a successful porn-career, ya hear?

Besides, 7.1 minus 5.2 is 1.9, so it's officially 1.9 times "betterer". Isn't that what version numbers really mean?
Tuxman wrote:It looks like you made it harder to update than required, the previous version was named Kronos. I guess renaming Kronos.ini to Khronos.ini leads to adequate results?
You were apparently still using the beta version you had been testing 6 months ago, and never updated to the release. The release version added the 'h' (which, interestingly enough, made it refer to an entirely different - and more appropriate - God). It's the little things that matter. :D
Last edited by Kilmatead on 2017 Oct 05, 15:38, edited 1 time in total.

Tuxman
Platinum Member
Platinum Member
Posts: 1483
Joined: 2009 Aug 19, 07:49

Re: Khronos: A Plugin for Ageing Gracefully

Post by Tuxman » 2017 Oct 05, 15:34

Beta versions are fine for me as long as they work as intended (or, in some cases, at all - keeping expectations low won't disappoint you at so many points in your life).

I've read that GCC, in general, is far from being a decent compiler, it tends to over-optimize your code by removing deliberately inserting verbose debugging. The joy of efficiency, I guess. If MinGW - we had this discussion... :D - will fail as expected, there is still Clang to sweep it up.
Tux. ; tuxproject.de ; Windows 10 x64
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Khronos: A Plugin for Ageing Gracefully

Post by Kilmatead » 2017 Oct 05, 16:14

Tuxman wrote:I've read that GCC, in general, is far from being a decent compiler, it tends to over-optimize your code by removing deliberately inserting verbose debugging. The joy of efficiency, I guess. If MinGW - we had this discussion... :D - will fail as expected, there is still Clang to sweep it up.
It's unusual for you to say so many incorrect things in one sentence... did you stop taking the little blue pills again? The hospital warned you about doing that.

Actually, GCC is an excellent compiler (which, since you're a C++ junky, usually has had full ISO support long before MS has even read the paper). The surprisingly quick adoption of the 7-series in the established distros kind of speaks for itself - never mind that GCC is what keeps the Linux Kingdom purring in the first place. And not to be picky, but debug builds aren't meant to be optimised in the first place, so applying compiler optimisations to them is user-error.

MinGW isn't likely to fail any time soon. It does fork a lot (especially in the x64 world), but cross-platform children never have an easy childhood, which either makes them equal-parts stronger adults and neurotic mamma's-boys, or both, or neither. You never know. (GCC has been 7.2 since the summer, but MinGW is still 7.1 for some reason... but hey, stable is stable; I played around with the scripts for re-building MinGW to 7.2 myself, but god that stuff's insane, which probably explains the multiplicity of forks.)

The MS compiler is... well... MS. 'Nuff said. I think a few years ago the Intel compiler was considered "the best" (whatever that means), but since normal people couldn't afford to license it, no one talks about it much any more.

Clang? Great, if you're into Apple-oriented Objective-C stuff... other than that I'm fairly neutral about LLVM. The eco-system has more than enough room for everyone. (Except the C# crowd - they should be taken out and maimed alongside the rest of the Java kids. But, well, if they're happy, let them be... with any luck the species will die out from inbreeding someday...)

Post Reply