Opened 14 years ago

Last modified 10 years ago

#77 assigned defect

libc: glob is making gnu make horribly slow

Reported by: bird Owned by: bird
Priority: normal Milestone: libc-0.7
Component: libc Version: 0.6
Severity: normal Keywords: glob make


This is what GNU make is doing extremely much of (at least in the kBuild case): glob("somefile-but-no-wildcard", GLOB_NOCHECK|GLOB_ALTDIRFUNC, NULL, &gl)

If possible glob should not convert this to it's internal 64-bit character strings, and then backagain to multibyte strings in order to do lstat() on the string. It should simply check that there are no wildcards (*?[]) and return shortest path. I just did this form the GNU make (kmk) code now, and reduced the time it took to figure out that libc.a was built and nothing had to be done from 32 seconds to 5.6 seconds

Other glob() implementations should be considered or at least consulted. We're currently using one from about FreeBSD 5.3 I think.

Change History (3)

comment:1 Changed 13 years ago by bird

Milestone: libc-0.6.2libc-0.6.3

comment:2 Changed 13 years ago by bird

Milestone: libc-0.6.3libc-0.6.4

comment:3 Changed 10 years ago by bird

Milestone: libc-0.6.4libc-0.7
Status: newassigned
Note: See TracTickets for help on using tickets.