Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread Dimitris Papastamos
On Mon, May 12, 2014 at 11:36:28AM -0300, Amadeus Folego wrote: > Maybe we should include a benchmark script so that we can test if a > patch has a regression on performance? Yes, it has been discussed before. If anyone feels up to the task to make an sbase-test repo, that would be nice.

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread Amadeus Folego
Maybe we should include a benchmark script so that we can test if a patch has a regression on performance?

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread FRIGN
On Mon, 12 May 2014 12:57:57 +0200 Hiltjo Posthuma wrote: > (Re)compiling the regex for each line doesn't make sense (imho) and > slows it down alot. Damn, how could I miss that? That's definitely true! Thanks for investigating this, I'll take better care next time. Cheers FRIGN -- FRIGN

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread Dimitris Papastamos
On Mon, May 12, 2014 at 12:57:57PM +0200, Hiltjo Posthuma wrote: > On Mon, May 12, 2014 at 12:34 AM, FRIGN wrote: > > Hello, > > > > previously, we allocated one regex_t for each pattern found. > > This gets pretty nasty once the tree of patterns grows. > > Reusing one regex_t and regfreeing it af

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread Hiltjo Posthuma
On Mon, May 12, 2014 at 12:34 AM, FRIGN wrote: > Hello, > > previously, we allocated one regex_t for each pattern found. > This gets pretty nasty once the tree of patterns grows. > Reusing one regex_t and regfreeing it after each use inside grep() > implies just one simultaneous element in memory

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-12 Thread Dimitris Papastamos
On Mon, May 12, 2014 at 12:36:12AM +0100, Dimitris Papastamos wrote: > On Mon, May 12, 2014 at 12:34:36AM +0200, FRIGN wrote: > > Hello, > > > > previously, we allocated one regex_t for each pattern found. > > This gets pretty nasty once the tree of patterns grows. > > Reusing one regex_t and regf

Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-11 Thread Dimitris Papastamos
On Mon, May 12, 2014 at 12:34:36AM +0200, FRIGN wrote: > Hello, > > previously, we allocated one regex_t for each pattern found. > This gets pretty nasty once the tree of patterns grows. > Reusing one regex_t and regfreeing it after each use inside grep() > implies just one simultaneous element in

[dev] [sbase] [PATCH] Make grep more memory-efficient

2014-05-11 Thread FRIGN
Hello, previously, we allocated one regex_t for each pattern found. This gets pretty nasty once the tree of patterns grows. Reusing one regex_t and regfreeing it after each use inside grep() implies just one simultaneous element in memory and a drastic decrease in memory-consumption. Please let m