© J.C. Kessels 2009
MyDefrag Forum
May 19, 2013, 09:58:55 pm
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
MyDefrag v4 Forum
>
Requests for new features
>
More power to filebooleans
Pages: [
1
]
« previous
next »
Print
Author
Topic: More power to filebooleans (Read 816 times)
Kasuha
JkDefrag Hero
Posts: 595
More power to filebooleans
«
on:
January 22, 2011, 10:20:13 pm »
My idea is, syntax "like" regular expressions or regular expressions themselves could be used in filebooleans. For example, instead of
FileName("*.7z")
or FileName("*.arj")
or FileName("*.avi")
or FileName("*.bak")
or FileName("*.bup")
MyDefrag could support something like
FileName("*.7z|*.arj|*.avi|*.bak|*.bup")
evaluating this in a single run (using a single search tree) which would make evaluating such complicated filebooleans much faster. And it would be also nice to have support for full extended regular expression:
FileNameRegex("\.7z$|\.arj$|\.avi$|\.bak$|\.bup$")
as regular expressions are much more powerful than filenames with wildcards.
There are already free implementations supporting such searches available, too.
Logged
jeroen
Administrator
JkDefrag Hero
Posts: 7155
Re: More power to filebooleans
«
Reply #1 on:
January 23, 2011, 06:13:04 am »
Thanks for sharing your idea, I appreciate it. I have looked at using regular expressions in the beginning of MyDefrag and tried a couple of free implementations. But it is an order of magnitude too slow. Even on a small harddisk there are typically hundreds of thousands of files, and running a regular expression for so many inputs simply takes too much time. Regular expressions work great for comparing a pattern with a single big input, not so great for comparing a pattern with lot's of small inputs, such as filenames. Searching for a solution for the speed problem I arrived at the current filebooleans, which run through all filenames in a tight loop with basic string comparions.
Logged
Kasuha
JkDefrag Hero
Posts: 595
Re: More power to filebooleans
«
Reply #2 on:
January 23, 2011, 07:54:35 pm »
That's strange as I'm pretty sure something we are using is able to perform hunders of thousands searches per second. I'll try to check what are we using there.
Logged
Kasuha
JkDefrag Hero
Posts: 595
Re: More power to filebooleans
«
Reply #3 on:
January 24, 2011, 11:30:51 am »
I have found we are using just GNU libc regex library, particularly the utf8regex port of it (
http://jwilk.net/software/utf8regex
).
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...