Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 07, 2016, 04:11:51 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: INDEX/CACHE vs REALTIME  (Read 8558 times)

oxman

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 8
    • View Profile
    • Donate to Member
INDEX/CACHE vs REALTIME
« on: July 23, 2010, 10:36:36 AM »
Hello,

I know this is one of the most important and discussed topic of Faar.
But, how can we improve the speed of search and keeping a realtime behavior ?

I dunno but maybe some points of reflexion :
- index/cache system should be enable/disable by directory
- choose to only include or exclude pattern file name to reduce the size of index/cache
- try to find in index/cache first then into directory/realtime

For 80% of my usage, the realtime system is very good.
But for the 20% other is not. I've lots of subdirectory in some case, i need to set an infinite recursive deep.

But right now i've disable these directory which are in 20% of this case because unless i see the "searching" for something like 10 sec, i want something in < 100ms

I've an SSD hard drive, so a very quick hard drive .

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,409
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #1 on: July 23, 2010, 11:01:33 AM »
welcome to the site oxman  :up:

i agree with your two main points:
Quote
- index/cache system should be enable/disable by directory
- try to find in index/cache first then into directory/realtime

an optional cache like this is on my todo list.

one workaround some people use, is the "Everything" plugin for farr, which uses an indexed search when you request it:


i may try to finally get a built-in optional indexing system in place before the end of the year.
« Last Edit: July 23, 2010, 11:03:41 AM by mouser »

oxman

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 8
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #2 on: July 23, 2010, 11:55:49 AM »
Hum thanks, Everything is cool but indeed not exactly what I want :)

I hope you'll implement that :)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #3 on: July 23, 2010, 04:26:08 PM »
In addition to the everything plugins you can also use a FARR alias to quickly open a separate Everything window with a search phrase. I use two spaces at the end of a FARR searchphrase as regex pattern. Very handy as you can first search with FARR and, if what you're looking for isn't found in a second or two, just tap space space.

regular expression pattern box:
^(.*)\s\s$
Results box:
Everything Search: $$1 | dolaunch C:\Program files\Everything\Everything.exe -search "$$1"

(modify the path to fit your installation directory)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #4 on: July 23, 2010, 10:44:01 PM »
In addition to the everything plugins you can also use a FARR alias to quickly open a separate Everything window with a search phrase. I use two spaces at the end of a FARR searchphrase as regex pattern. Very handy as you can first search with FARR and, if what you're looking for isn't found in a second or two, just tap space space.

regular expression pattern box:
^(.*)\s\s$
Results box:
Everything Search: $$1 | dolaunch C:\Program files\Everything\Everything.exe -search "$$1"

(modify the path to fit your installation directory)

Very handy. Thanks Nod5!

(I use the TinyEverything Plugin. It works generally well but the problem is that French accentuated letters aren't displayed properly and I can't launch these entries. So, all in all, even if I'd prefer to have all results in the farr window (one reason is that it's so easy to copy the full path of an entry... ctrl-c), the everything UI works better at this point.)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #5 on: July 24, 2010, 05:21:25 AM »
Armando, I've had that problem with Everything too but I use autohotkey (surprise, surprise!  ;D) to copy the full file path in Everything with control+shift+c:
#IfWinActive, ahk_class EVERYTHING
^+c::
controlgettext, clipboard, msctls_statusbar321, ahk_class EVERYTHING
return

edit: I just thought of an alternative solution: do control+c twice rapidly
#IfWinActive, ahk_class EVERYTHING
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey%
controlgettext, clipboard, msctls_statusbar321, ahk_class EVERYTHING
return

edit2: just realized that that last solution works just as well for windows explorer - yay!
#IfWinActive, ahk_class CabinetWClass
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey%
clipboard = %Clipboard%
return
« Last Edit: July 24, 2010, 05:35:50 AM by Nod5 »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #6 on: July 24, 2010, 09:45:48 AM »
I really haven't thought of doing that!
Thanks for showing me this neat trick. I should use AHK more. I use it for many little thing, but haven't delved in it enough.
Many thanks Nod5.  :)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #7 on: July 24, 2010, 10:08:15 AM »
I don't know AHK's syntax much (didn't have the time to double check), but this worked too.

Code: Autohotkey [Select]
  1. ^+c::
  2. IfWinActive, ahk_class EVERYTHING
  3. controlgettext, clipboard, msctls_statusbar321, ahk_class EVERYTHING
  4. return

I did that because the other way interfered with other parts of my own script when put at the beginning -- and I didn't want to put it at the end...

I also had to enable an option in everything to show the file path in the status bar... Otherwise I got "Object 1".  :)

I haven't been able to copy path in explorer though. We'll see later.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #8 on: July 24, 2010, 12:51:05 PM »
Yes, if you're putting the above into one "master script" then it might interfere with other things. You can add a #IfWinActive below the controlgettext row in my code to prevent that I think.
http://www.autohotke...nds/_IfWinActive.htm

Re explorer: Explorer with tree view pane on has a different ahk_class. Could that be the problem? Try this:
#IfWinActive, ahk_class CabinetWClass
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey%
clipboard = %Clipboard%
return
#IfWinActive, ahk_class ExploreWClass
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey%
clipboard = %Clipboard%
return
#IfWinActive

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #9 on: July 24, 2010, 02:45:16 PM »
Very cool. Yes this works perfectly. Thanks for the little AHK lesson, Nod5. Much appreciated!  :Thmbsup:
This gives me the incentive to dive into AHK a bit more.

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 231
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #10 on: July 26, 2010, 03:14:23 AM »
In addition to the everything plugins you can also use a FARR alias to quickly open a separate Everything window with a search phrase. I use two spaces at the end of a FARR searchphrase as regex pattern. Very handy as you can first search with FARR and, if what you're looking for isn't found in a second or two, just tap space space.

regular expression pattern box:
^(.*)\s\s$
Results box:
Everything Search: $$1 | dolaunch C:\Program files\Everything\Everything.exe -search "$$1"

(modify the path to fit your installation directory)

genius  :Thmbsup:
It is impossible to make anything foolproof because fools are so ingenious.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #11 on: July 26, 2010, 04:41:19 PM »
One more (last?  :)) revision: there's no need for separate autohotkey code for path copying in Everything and Explorer. (one could also try removing the IfWinActive parts completely. The hotkey then likely works fine in all apps that use ctrl+c to put files on the clipboard for copying. But there might be hickups in apps that use ctrl+c for something else so I'll keep the limits.)
;-- doubletap ctrl+c to copy path in everything and explorer
#IfWinActive, ahk_class ExploreWClass
~^c::
#IfWinActive, ahk_class CabinetWClass
~^c::
#IfWinActive, ahk_class EVERYTHING
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey%
clipboard = %Clipboard%
return
#IfWinActive

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #12 on: August 20, 2010, 05:46:06 AM »
One more revision: Tripletap to copy only filename(s) w/o path. Now also works on Desktop.
;-- doubletap ctrl+c to copy path(s) in everything and explorer
;-- tripletap ctrl+c to copy filename(s)
#IfWinActive, ahk_class ExploreWClass
~^c::
#IfWinActive, ahk_class CabinetWClass
~^c::
#IfWinActive, ahk_class EVERYTHING
~^c::
#IfWinActive, ahk_class Progman
~^c::
if A_TimeSincePriorHotkey < 500
if A_PriorHotkey = %A_ThisHotkey% ;-- doubletap
{
clipboard = %Clipboard%

if xtriple = %A_ThisHotkey% ;-- tripletap
{
sleep 100
clipboard := RegExReplace(clipboard, "m)^.*\\(.*)$", "$1")
xtriple =
}
else
 xtriple = %A_ThisHotkey%
}
else
xtriple =
else
xtriple =
return
#IfWinActive
« Last Edit: August 20, 2010, 05:56:37 AM by Nod5 »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #13 on: September 08, 2010, 01:06:23 PM »
Thanks NOD5 !  :) it's appreciated.
I'm late, I know...

kikon

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 19
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #14 on: September 30, 2010, 12:16:10 PM »
I guess , it would better not adding INDEX feature.

Instead indexing, I think add some feature optionally:

1) It will be great, can search in other streams of files, such as Subject, Keywords, Category, Artist etc. Because often these streams more descriptive than Name of File

2) To search description files of downloaded files
the huge number of files created by downloading. Often the name doesn't mean something. For example I type WinHex in FARR, to find the file and I do not remember that it downloaded as w13w2.zip name. but its description file (w13w2.txt) file contains more meaningful info.

(sorry for bad English  :()
« Last Edit: October 01, 2010, 05:51:03 AM by kikon »

matesko

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 8
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #15 on: January 10, 2011, 01:34:52 PM »
I would like to see caching too. I switched to launchy because of that - speed. But I lack a lot of farr functionalities/plugins, no perfect solution for now :-(

Using everything is total overkill

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Points: 101
  • Posts: 223
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #16 on: June 21, 2015, 04:45:32 PM »
In addition to the everything plugins you can also use a FARR alias to quickly open a separate Everything window with a search phrase. I use two spaces at the end of a FARR searchphrase as regex pattern. Very handy as you can first search with FARR and, if what you're looking for isn't found in a second or two, just tap space space.

regular expression pattern box:
^(.*)\s\s$
Results box:
Everything Search: $$1 | dolaunch C:\Program files\Everything\Everything.exe -search "$$1"

(modify the path to fit your installation directory)

I'm resurrecting ancient threads today  :D Here's a question for the FARR gurus who came up with this clever double-space trick:

I'd like to use both the keyword "ev" and the double-space trick, if possible.

So there are three possible scenarios; the last one is the problematic one (for me):

I type a phrase (without "ev") and then hit space-space; it opens in Everything.
I type "ev" then a phrase; I see the first few results from Everything embedded in FARR.
I type "ev" then a phrase; I see the first few results from Everything, embedded in FARR. I then type space space and the phrase (but not "ev") is opened in the main Everything window.

Any ideas?

Thanks,
Eric

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: INDEX/CACHE vs REALTIME
« Reply #17 on: June 23, 2015, 12:31:58 PM »
I type "ev" then a phrase; I see the first few results from Everything, embedded in FARR. I then type space space and the phrase (but not "ev") is opened in the main Everything window.
Hi ayryq, I think the Everything plugin would need to be modified to handle that. Once the "ev" has triggered the plugin an alias cannot jump in and override that AFAIK. It looks like the coders of those plugins hasn't posted here since 2010/2009 so they may be abandoned but you can make a post in either of those threads or try to PM them, maybe they have email alert for new posts there activated.

Mouser: this question gave me an idea though: imagine there was a command similar to "dolaunch showfilehtml" but which instead parsed an input textfile file and made one FARR result list item for each line in the file. Then it might be possible to make an alias that first runs the Everything ev.exe command line tool with a search phrase from FARR, outputs the result to a list.txt file, and then finally does (the not yet existing command) "dolaunch showfilelist list.txt". But maybe the detour with a .txt file would make that too slow to be useful? Anyway, such a "showfilelist" command would make it easy to display custom lists of launchable paths from other tools in FARR.