Closed Bug 381247 Opened 17 years ago Closed 17 years ago

Speed up mkdepend on Windows + VMWare

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

(Keywords: verified1.8.1.8)

Attachments

(2 files)

Attached patch fixSplinter Review
I build on Windows under VMWare, with the sources in VMWare's shared file system and local objdirs. I noticed that mkdepend was running incredibly slowly. For example, mkdepend on nsPresShell.cpp:
real    0m32.250s
user    0m0.031s
sys     0m0.031s

Primitive profiling suggests that it was spending most of its time blocked on stat() calls searching include directories for include files. On a hunch I replaced the stat() calls to check for file existence with a call to GetFileAttributesEx. The result:
real    0m1.578s
user    0m0.015s
sys     0m0.015s

I suspect the issue is that stat() fills in a lot of fields like inode and user/group/other permissions that are expensive to gather on Windows, especially in VMWare's file system perhaps.
Attachment #265348 - Flags: review?(benjamin)
Attachment #265348 - Flags: review?(benjamin) → review+
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 381686
Attached patch Bustage?Splinter Review
The patch breaks the tinderbox build on Solaris: http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox-Ports. S_ISDIR should be the POSIX macro for this check.
Attachment #265789 - Flags: review?
Attachment #265789 - Flags: review? → review?(benjamin)
Flags: in-testsuite-
Attachment #265789 - Flags: review?(benjamin) → review+
Checking in include.c;
/cvsroot/mozilla/config/mkdepend/include.c,v  <--  include.c
new revision: 3.6; previous revision: 3.5
done
roc, any chance this could get landed on the 1.8.1 branch as well?
Dunno. Nominate it and find out
Attachment #265348 - Flags: approval1.8.1.5?
Attachment #265789 - Flags: approval1.8.1.5?
Comment on attachment 265348 [details] [diff] [review]
fix

approved for 1.8.1.5, a=dveditz for release-drivers
Attachment #265348 - Flags: approval1.8.1.5? → approval1.8.1.5+
Attachment #265789 - Flags: approval1.8.1.5? → approval1.8.1.5+
Comment on attachment 265348 [details] [diff] [review]
fix

closing tree early, this will have to wait for next time
Attachment #265348 - Flags: approval1.8.1.6?
Attachment #265348 - Flags: approval1.8.1.5-
Attachment #265348 - Flags: approval1.8.1.5+
Attachment #265789 - Flags: approval1.8.1.6?
Attachment #265789 - Flags: approval1.8.1.5-
Attachment #265789 - Flags: approval1.8.1.5+
Comment on attachment 265348 [details] [diff] [review]
fix

approved for 1.8.1.7, a=dveditz for release-drivers
Attachment #265348 - Flags: approval1.8.1.7? → approval1.8.1.7+
Attachment #265789 - Flags: approval1.8.1.7? → approval1.8.1.7+
Keywords: checkin-needed
Whiteboard: checkin needed for mozilla1.8 branch
Whiteboard: checkin needed for mozilla1.8 branch
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: