| Anonymous | Login | Signup for a new account | 11-10-2008 10:58 PST |
| Main | My View | View Issues | Change Log | Docs |
| 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 | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |