[haiku-bugs] Re: [Haiku] #9529: Use native text searching instead of grep

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Thu, 02 Apr 2015 18:22:04 -0000

#9529: Use native text searching instead of grep
---------------------------------------+----------------------------
Reporter: X512 | Owner: waddlesplash
Type: enhancement | Status: reopened
Priority: normal | Milestone: Unscheduled
Component: Applications/TextSearch | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
---------------------------------------+----------------------------

Comment (by pulkomandy):

For the record, the problems with the reverted code:
* It was reading the whole file to memory, which could fail for big files
* It did not support using regular expressions for searching, only plain
text search

The better way to fix this is to run grep once for all the files, instead
of once for each file. Or, if we really want the tool to run without grep,
it needs to work in a similar way to it: allow regexp, not read the whole
file to memory but one line at a time. This is, I think, more work than
needed, unless an existing library can do the work?

--
Ticket URL: <https://dev.haiku-os.org/ticket/9529#comment:10>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: