Build becomes slow with CIFS mounted srcdir
Recent 9e6e39c3512f7a962c44dc3729c98a0f8be90341 increases many include files and it makes slow build on my machine.
My build environment is not normal:
- srcdir is managed on Windows 10 host file system and edit it on windows native editors (xyzzy)
- Build on Linux (Ubuntu 18.04) by mounting srcdir with CIFS (samba)
# on e7128aa772787a9c9e95708e2d2534484861a765 # gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) # on Ubuntu 18.04 # on Hyper-V # on Windows 10 # srcdir is mounted by CIFS (Samba) on Windows host file system # without ccache $ time make range.o compiling /home/ko1/src/ruby/clean/range.c real 0m17.662s user 0m2.572s sys 0m2.599s # with ccache $ time make range.o compiling /home/ko1/src/ruby/clean/range.c real 0m35.361s user 0m4.628s sys 0m5.283s
# without ccache $ rm range.o; time -p make range.o compiling /home/ko1/src/ruby/clean/range.c real 1.16 user 0.85 sys 0.06
Same machine, but srcdir on guest Linux (/dev/sda2 on / type ext4 (rw,relatime,data=ordered))
# on e7128aa772787a9c9e95708e2d2534484861a765 $ time make range.o compiling /home/ko1/ruby/v2/src/trunk/range.c real 0m1.207s user 0m1.065s sys 0m0.140s
Same machine, but compile on host Windows (mswin64).
$ time nmake range.obj Microsoft(R) Program Maintenance Utility Version 14.14.26428.1 Copyright (C) Microsoft Corporation. All rights reserved. generating id.h id.h updated compiling C:/ko1/src/ruby/clean/range.c range.c real 0m3.779s user 0m0.000s sys 0m0.046s
Another Linux box works fine.
# Linux box on another machine without ccache $ time make range.o compiling /home/ko1/ruby/v2/src/trunk/range.c real 0m1.992s user 0m1.858s sys 0m0.123s
I recognize that using CIFS for build environment is not normal environment, so it is not a big issue.
But I filed it if there is a chance to solve it.
BTW, I tried to make simple .c files which includes 1000 simple files, but only a few seconds to build. So the file number is not a big issue.
Updated by usa (Usaku NAKAMURA) 6 months ago
On my Windows PC, building ruby without tests takes over 20 min now.
And mswin-CI (http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/recent.html) also fails by timeout.
Updated by ko1 (Koichi Sasada) 6 months ago
- Status changed from Open to Closed
Applied in changeset git|443389effc37308ce1a3c3a840082a344fc6af56.
reduce duplicate include.
Without this patch, 20k files are opened (openat syscall) because
of duplicate includes. This patch reduced it to 3k and build time
was reduced compile time of range.o from 15sec -> 3sec on my machine.