BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000758 [BusyBox] Other major always 02-28-06 00:24 03-09-06 14:25
Reporter rfelker View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000758: grep extremely slow
Description time ./busybox grep a.*b ~/Mail/saved > /dev/null
real 0m19.583s
user 0m19.337s
sys 0m0.097s

time grep a.*b ~/Mail/saved > /dev/null
real 0m0.379s
user 0m0.283s
sys 0m0.083s

This is because the busybox version insists on recompiling the regex over and over on each line. Fixing it is a matter of just calling regcomp once and keeping the regex. It's trivial for the case of only one pattern, but requires a tradeoff between memory and performance for the case of many patterns.
Additional Information My comparison isn't quit fair since the two times are with different regex implementations. However the current grep code is still obviously wrong.
Attached Files

- Relationships

- Notes
(0001146)
vodz
02-28-06 02:11

Ok.
See 14361 SVN revision.
 

- Issue History
Date Modified Username Field Change
02-28-06 00:24 rfelker New Issue
02-28-06 00:24 rfelker Status new => assigned
02-28-06 00:24 rfelker Assigned To  => BusyBox
02-28-06 02:11 vodz Note Added: 0001146
02-28-06 02:11 vodz Status assigned => resolved
02-28-06 02:11 vodz Resolution open => fixed
03-09-06 14:25 landley Status resolved => closed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker