Pathologically Eclectic Rubbish Lister | |
PerlMonks |
looking for ideas for managing snippets collectionby zentara (Archbishop) |
on Apr 28, 2004 at 23:45 UTC ( [id://348981]=perlquestion: print w/replies, xml ) | Need Help?? |
zentara has asked for the wisdom of the Perl Monks concerning the following question:
Hi, my snippets collection is getting kind of large, and my old method of letting Perl grep through all the files is getting slow and "hard drive intensive". So I have a preliminary design using swish++ and then dumping the files returned from swish into a Tk listbox, and then you can browse the file with the search word highlighted. So I figure this has been done before, and was wondering if there are better ways. (Before I get too deep into it :-) The only drawbacks I see is swish++ likes to ignore alot of short common words, which are Perl keywords...like for, if ,etc; and it is limited to single word searches. So has anyone else found a method which can limit the search to 1 file, like swish++ ? My first inclination was just to "cat" all the files together in a big text file, and just search it. But then what would be the best way to compress and search it, retaining the original filenames? My intuition tells me I want to convert the text to some compressed binary reperesentation, to make the searching faster, and the file smaller. So I would appreciate any ideas and pointers which anyone may have.(before I go sailing off in the wrong direction :-) ) TIA I'm not really a human, but I play one on earth. flash japh
Back to
Seekers of Perl Wisdom
|
|