Opened 9 years ago

Last modified 4 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
Cc:

Description

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 8 years ago by bird

  • Milestone changed from libc-0.6.2 to libc-0.6.3

comment:2 Changed 8 years ago by bird

  • Milestone changed from libc-0.6.3 to libc-0.6.4

comment:3 Changed 4 years ago by bird

  • Milestone changed from libc-0.6.4 to libc-0.7
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.