I think Kilmatead has a point about cumulative color coding being potentially faster due to fewer rules....
I was just thinking about the original poster's wish to color a single file. I used the tag-in-comments example (though there are probably other ways to achieve this). I was imagining integrating this into my coloring scheme.
My long-standing scheme is
Word and TXT = blue
Excel and CVS = green
Image files = purple
PDFs = brick
Executables = red
An important part about this list, is the order. I have way more Word and TXT files, so that is put at the top, so x2 can find it quickly. Executables is last because that's what I have fewest of.
These rules apply to most of my files. They are high-frequency-of-occurrence. If I want a low-frequency-of-occurrence rule (such as "bold me" in the comments field), the rule must be at the top of the list.
Let's say I want the option to arbitrarily bold any Word, TXT, Excel, CVS, or PDF... Ideally, I'd like my low-frequency rules last such as:
Word and TXT = blue
Excel and CVS = green
Image files = purple
PDFs = brick
Executables = red
Word and TXT and "bold me" = bold blue
Excel and CVS and "bold me" = bold green
PDFs and "bold me" = bold brick
This wouldn't work, though... "Word and TXT" would satisfy x2 before it had a chance to see "Word and TXT and 'bold me.'" The needed order would be:
Word and TXT and "bold me" = bold blue
Word and TXT = blue
Excel and CVS and "bold me" = bold green
Excel and CVS = green
Image files = purple
PDFs and "bold me" = bold brick
PDFs = brick
Executables = red
As we add rules of increasing specificity, the most-specific will tend to have the lowest-frequency of occurrence and yet, ironically, must be at the top of the list of rules.
Of course this still might not justify the 'cumulative' idea. With the above example--as cumulative rules--we have:
Word and TXT = blue
Excel and CVS = green
Image files = purple
PDFs = brick
Executables = red
"bold me" = bold
If half of my files (in a given folder) are either Word or TXT, then with the above 8 exclusive rules, x2 only has to look at the first two, for any Word or TXT file, whereas with the 6 cumulative rules, x2 would have to look through all 6...
Color Coding Of File Names And Other Applications
Moderators: fgagnon, nikos, Site Mods
-
- Site Admin
- Posts: 16297
- Joined: 2002 Feb 07, 15:57
- Location: UK
-
- Platinum Member
- Posts: 4797
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
In the honourable interests of masochism (or sadism, if you ask my hard drives), I created 25 individual rules (Folders + Files) which would at least initially meet most common elements, but each had two extended rules at least one of which would never "hit" (ensuring that all rules "ran" as many comparisons as possible).nikos wrote:the question isn't the number of rules but the number of rule executions ... each rule must execute for each file regardless
Just for the sake of commonality, I normally run my machine at 3.2GHz over 4 cores - but for this test I underclocked it to 1.8GHz and disabled two cores (more normal for most people) and used the slowest USB drive I could find.
For (what I call) "normal" filesystem browsing, this was no great drain on resources and everything seemed to tick over without major complaint (a little sluggish, but not suicidal).
As Nikos suggested, larger folders get more interesting - \System32, \SysWOW64, etc each comprising around 2500 files: scrolling through these (details mode) was a bit like tying knots with those really thin wires they put in phone cables (a PITA, in other words) - very choppy, not a hope of "smooth" operation - even when the same rules were applied under my normal overclocked settings on a real HD (not USB rubbish), though the effects were not "unacceptable", they were annoying. Like listening to children playing in the street all bloody day long.
So I'm thinking Nikos has a point - except the choice should still be up to the user, as always (I don't imagine most people have 25+ arcane colour rules).
So maybe if there was an extra switch available when creating rules ("Apply this Rule Result Cumulatively") which would only be used rarely anyway, mainly as a modifier (Bold/Italic), which would be the most common usage. If someone wanted exclusive rules, that would still be available too.
Hey, it's just a thought.
While Nikos might have coded his rules in Fidel's shadow, let's hope the "give the people choice" mantra is still part of the revolution. My proof? The picture is old and grainy, but that's him all right, our historically intrepid leader. Some say he had a hand in designing Cuba's original flag, too.

P.S. Yes Fred, it's Bank Holiday boredom again.
Last edited by Kilmatead on 2010 May 03, 18:44, edited 2 times in total.
-
- Gold Member
- Posts: 534
- Joined: 2008 Jan 05, 18:58
And so ends the C4.
Hey, kudos for doing that test!

Hey, kudos for doing that test!
This occurred to me as well. I think having a 'per-switch' rule isn't the way to go though... For the reasons listed in my last post... The rules with cume=yes would have to be at the top of the list. I think having a master switch in the advanced settings might be better; maybe a layout-specific setting? This would need to include a "slow/hog" warning. Be disabled by default.Kilmatead wrote:So maybe if there was an extra switch available when creating rules ("Apply this Rule Result Cumulatively") which would only be used rarely anyway, mainly as a modifier (Bold/Italic), which would be the most common usage. If someone wanted exclusive rules, that would still be available too.
No way!!!Kilmatead wrote:The picture is old and grainy, but that's him all right, our historically intrepid leader.
Or is it good ole ivy-avoidance?Kilmatead wrote:P.S. Yes Fred, it's Bank Holiday boredom again.

-
- Platinum Member
- Posts: 4797
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Cumulative Positive rules could be placed in their own internal array which would be applied to all files anyway (probably run after any other rule had a "hit"). Thus their position in the "visible queue" is irrelevant - any Fixed Rules would still behave as they do now, order dependant, though I imagine that order would be irrelevant if Cumulative Ruling existed.kunkel321 wrote:The rules with cume=yes would have to be at the top of the list. I think having a master switch in the advanced settings might be better; maybe a layout-specific setting? Be disabled by default.
Thus the current "efficiency" is retained, where the sooner the "hit" the quicker the queue gets sorted - only the cumulative rules themselves would add lag.
It seems to me the Cumulative Positive list would be fairly small, applying mostly Bold or Italic settings to already defined colours - I would think it rare to explicitly want to change a file's colour if it's been defined by another rule first.
Either way, definitely off by default, and perhaps a warning.
Shh, don't say that so loud. The conifers I have to take down might get nervous that it's their turn next.kunkel321 wrote:Or is it good ole ivy-avoidance?
Nikos seems to be having a Forrest Gump type of weekend. At least I think I got the scaling a little better this time. Though you've got to wonder what that fella with NSA on his armband is doing there. (That bit's all in the original photo.)kunkel321 wrote:No way!!!

Who knew that Nikos had such a chequered past? July Revolutionary, indeed!"4th January 1959: Cuban President Fidel Castro speaking from a podium to the people of Camaguey, Cuba about the Triumph of the Cuban Revolution three days before against the forces of dictator Fulgencio Batista. Castro is surrounded by members of the victorious 26th of July Revolutionary Movement."
