SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

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: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

If Nikos can do a lazy summer's day update, so can I... though I doubt anyone in the history of all human endeavour has fussed over a measly 8-bytes more than I. :D (Download link in the original post updated.)

Code: Select all

Changelog for 2.5.0.1

Added: All IPC is handled directly by the plugin allowing for the removal of the ES 1.4 SDK entirely
	- Cuts package size in half
	- Reduces average folder query/response time from ~5ms to under 3ms
Added: Timeouts as failsafes against possible ES/SizeES IPC thread hanging
Added: Expanded range of Status.ES message types and priorities
Added: Lower memory footprint by removing unnecessary long-path buffer allocation block
This update is more interesting for what's under-the-bonnet than it is for raw hoo-rah.

Previous releases have all had the ES SDK monolithically compiled into it, but after going through all his original code to see how it works there were a few things I decided to do a little differently (not least a proper HWND_MESSAGE proc which the plugin hosts), so I just tore it all down, rewrote it from scratch and did it the hard way (as usual).

(And why-oh-why was stpcpy never included in the standard C library? It's so much more useful than ordinary copy, though it needed a widechar version. My work is never done.)

The end result? Well, it's probably as robust, fast, and light as it can possibly be - the lean-and-mean version, if you will. As the changelog mentions, around 2-and-a-bit milliseconds have been shaved off the query/response time, which essentially makes it twice as fast as the old version.

v2.0.0.2 Test 1: 4901ms / 1000 folders = 4.90ms
v2.5.0.1 Test 2: 2752ms / 1000 folders = 2.75ms

Consider this: you can easily browse through 10,000 folders a day, and if you've saved 20,000 milliseconds for that day, and you have a life-expectancy of 73 years, I have single-handedly saved you 532,900 seconds or 6.168 days of time. :wink: You're welcome. Take a longer holiday.

While I admit there may well be more than a few doubtful and glaring logical flaws in that scenario, as usual I'm easily amused, so hey...

By the way, those 8-bytes I fuss over? For those wondering, it's the size of the integer which holds the number of bytes in the foldersize. Yeah. Very exciting. An important and yet oddly useless piece of knowledge to start your day with. Long live the uint64_t. :)

Enjoy.
Tuxman
Platinum Member
Platinum Member
Posts: 1673
Joined: 2009 Aug 19, 07:49

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Tuxman »

Kilmatead wrote: 2024 Jul 06, 10:25 (And why-oh-why was stpcpy never included in the standard C library? It's so much more useful than ordinary copy, though it needed a widechar version. My work is never done.)
It was, depending on the standard. :)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
nikos
Site Admin
Site Admin
Posts: 16214
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

how did the version jump from 0.005 to 2.5? inflationary pressures?
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

nikos wrote: 2024 Jul 06, 14:12 how did the version jump from 0.005 to 2.5? inflationary pressures?
Oh look at you now, you add plugin version numbers to x2 and now you're an expert! How special!

To answer though, there never was a 0.0.0.5, the last of the "alphas" (before integration) was the ill-fated 0.0.0.3 which had Tuxman's weighty contribution included. Then it was gutted and rewritten and - inclusive of x2 integration - rebranded like the phoenix as version 2.0.0.0, which seemed appropriate enough. That went through two small revisions, which weren't worth mentioning (I updated silently as unless someone studied the source code they wouldn't know the difference).

Now, however, as explained in the post above, it jumped from 2.0 to 2.5 simply on the strength of me stripping out the whole SDK (except the header which defines the internal ES data structs), and rewriting it all myself. By the laws of arbitrary software development and the hubristic nature of humans to believe their contributions actually matter (what a ridiculous notion!), I dubbed it 2.5.0.1 just because I felt like it.

Wikipedia informs us that...
Stochastic - from Ancient Greek στόχος (stókhos) 'aim, guess') refers to the property of being well-described by a random probability distribution.
...which goes long way to explaining why when your version numbers get anywhere near x.5.0.0 they never manage to hit x.6 or x.7 but somehow automagically jump to (x + 1).0.0.0 - so who's talking about inflationary pressures? :D Methinks you know more about such things than I - this is just a vanity-amusement for me.

Besides, you obviously needed to test out your WDX version sensors, so I obliged. I'm nothing if not obliging... Random and Stochastic and mad... yet every now and then I make sense.
"The only difference between me and a madman," Salvador Dali laconically drawled, "Is that I'm not mad."
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Tuxman wrote: 2024 Jul 06, 13:57 It was, depending on the standard. :)
They say it once existed in GCC, but I can't find any real reference to it outside of the linux realm (certainly no header prototype) - so it doesn't appear to have enjoyed the ridiculous efforts that strcpy went through (inlining, et al) to put it on par with memcpy - which, come to think of it, it essentially is.

Speaking of which, I did find a lively confusion about why wmemcpy exists (which it does, in <wchar.h>)... everyone seems to have concluded that it's just redundant and silly, which I agree with. strpcpy, on the other hand, is demonstrably useful. We need to storm the ISO headquarters... wherever they are...
User avatar
nikos
Site Admin
Site Admin
Posts: 16214
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

Dali was a sweet fruitcake.... how's your arts and crafts?
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Arts and crafts... is that the one where I hold the scissors pointing up when I run across the room? Or maybe it's pointing down? If it's up, I take out my own eye (which seems biblical in some way), but if I hold them pointing down I stab little Betty Malone in the back, which means she'll never go to the prom with me 14 years in the future. That's unfortunate, 'cause she grew up to be a looker.

This arts and crafts malarkey seems very violent, and ultimately leads to a disappointing love life. :(

Give me integer-sizes any day. Much safer.
User avatar
nikos
Site Admin
Site Admin
Posts: 16214
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

you sir are craftier than Chichikov :)
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Now there's a name I haven't heard for a long time... that book wasn't about what I thought it was going to be about, given the title.

As a young rebellious scion seeking only the most depressing things in life (if a girl hadn't read Rimbaud she wouldn't get a second glance) I was more drawn towards Prince Nikolayevich Myshkin - though not in the emulatory sense - for some weird reason I've read that book too many times... it's become a contemplative thing. Multiple translations too, just to see what I may have been missing... a practice I errantly started when obsessed with Camus' l'Étranger, the title of which, curiously enough, has always been what I've renamed my downloads folder to ever since I was old enough to download stuff. (Though I erroneously type it as "étrangère" just because I'm weird that way - I like words with accent-symmetry. A quality I prize above all others.)

It's become quite useful over the years for checking unicode folder name support! Like this plugin... who'd have ever thunk that a French essayist and Sartre's personal bête-noire would have so much in common with an EVERYTHING_IPC_MATCHDIACRITICS constant?

:D
User avatar
nikos
Site Admin
Site Admin
Posts: 16214
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

so you have a case of extraordinary prolonged neoteny, somehow stuck in gothic teenage pessimism for yonks.
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

You make that sound like a bad thing. :) Being a grown-up is overrated - I'm one of those people who spend more time messing around with Witcher 3 mods than actually playing the game when the conservative bilbos of the world think I shouldn't even be doing that!

Whilst I do have a suspiciously well-thumbed copy of The Anatomy of Melancholy (for reference only, you understand - I use the audiobook version for proper brooding study), I haven't touched Une saison en enfer for probably 40 years now.

That's...

...progress?

Besides, I'm describing Kilmatead in his 20's... now, it's a little different. I'm more relaxed. That said, just the other day I shoveled 8 tonnes of gravel in one afternoon... not bad for a 56 year old grump! Eric Hoffer continues to be my hero.
User avatar
nikos
Site Admin
Site Admin
Posts: 16214
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

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

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Tuxman »

Kilmatead wrote: 2024 Jul 06, 15:37 They say it once existed in GCC, but I can't find any real reference to it outside of the linux realm (certainly no header prototype)
FreeBSD seems to have had stpcpy() since 2001 now, and they don't seem to remove it anytime soon. So that's the thing with standards: Everyone has one. :)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
johngalt
Gold Member
Gold Member
Posts: 650
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock
Contact:

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by johngalt »

Kilmatead wrote: 2024 Jul 06, 15:26
nikos wrote: 2024 Jul 06, 14:12 how did the version jump from 0.005 to 2.5? inflationary pressures?
<snip>
[...] rebranded like the phoenix as version 2.0.0.0, which seemed appropriate enough. That went through two small revisions, which weren't worth mentioning (I updated silently as unless someone studied the source code they wouldn't know the difference).

Now, however, as explained in the post above, it jumped from 2.0 to 2.5
Does this make this version the bastard halfling that is still better at everything than the pure stock version?

:beer:
Kilmatead wrote: 2024 Jul 07, 14:24 <snip>
... not bad for a 56 year old grump! Eric Hoffer continues to be my hero.
Holy handmaidens of Hong Kong!

You're only 3 years older than I am?

Or is that a perennially 56 years old birthday that you've settled on celebrating for the rest of your life?

:biggrin:
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4753
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

johngalt wrote: 2024 Jul 09, 18:58 Does this make this version the bastard halfling that is still better at everything than the pure stock version?
When I was young we used to steal those old fashioned Mercedes-Benz bonnet-emblems off the streets and use them as a poor-man's brass-knuckles, or at least we pretended as much. This version of the plugin is what the kids from your neighbourhood will use to adorn their keychains and mantelpieces for years to come. And if, by chance, one of those scallywag hoodlums should find a way to use it to become the street's newest discount dentist, then, yeah, this version is indeed the bastard halfling I would want guarding the integer representations of my folders. :D
johngalt wrote: Or is that a perennially 56 years old birthday that you've settled on celebrating for the rest of your life?
Around 1.77 trillion milliseconds ago back in nineteen sixty-and-eight during the Ides of March, little Kilmatead came into the world with a dangling Gauloises off his lips and a bedraggled (yet still stylish) Fedora perched atop his head. At least in my imagination he did. In reality I should think he was spanked, he spit, he cried, and promptly sought out the nearest teat. That in later years he misremembered that teat as belonging to La Lupa Capitolina is, of course, purely the product of whimsy, conjecture, and youthful exuberance. Don't all men reinvent the past to fit the form they are most pleased to inhabit?

That I raised Eric Hoffer to a hero's pedestal was not only to honour a stevedore philosopher's contrition to the hard labour of hard men, but also to draw attention to the last line of his wikipedia entry, which happily spits in the face of the Ivory Tower biographies of lesser-intellectuals:
To this day, no one ever has claimed to have known Hoffer in his youth, and no records apparently exist of his parents, nor indeed of Hoffer himself until he was about forty, when his name appeared in a census.
My continuous surprise at the many people who desperately cling to the identities with which they were assigned and burdened at the whim of officialdom, is always balanced by the multitudes whose imaginary claims of "ages not their own" parade quietly through their own biographies. I've never been bothered by getting older - I neither embrace it nor fear it - but I do like to study it. From the daily morning pains engendered by my workaday 8-tonne excursions, to the entropy which inhibits a willingness of the eyes to see unaided, the process is probably not one to be challenged or retarded by chemicals from, and ablutions to, the "miracles of modern medicine". Rather, I'd like to strive to a mindful stasis, remaining acutely aware of the diminishing sunsets and the lessening grip of mental disciplines pervading my days... not with regret, or sad refrain, but instead with the child's surprise and curiosity as to why it is he will never see "that" blade of grass again, or coax the same cicada up the same tree as he remembers he may have done in his yesterdays.

So yeah, in 3 years time I'll have 16-tonne of gravel delivered to your door, and I'll pit my Hoffer to your Rand, and we'll see which of our dead geriatric idealogues can fling the dark stones of their unrepatriated youths the furthest in mind and space. :wink:

If nothing else, you'll get a new driveway out of it, and I'll just have another twinge in my back to complain about the next day. Such is life. :)
Post Reply