Bug #16772

Build becomes slow with CIFS mounted srcdir

Added by ko1 (Koichi Sasada) 7 months ago. Updated 6 months ago.

Target version:


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

on 9e6e39c3512f7a962c44dc3729c98a0f8be90341~

# 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

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.

Related issues

Related to Ruby master - Bug #16770: Commit: RUBY3_HAS_BUILTIN: fix for nonexistent builtin - large increase in MinGW & mswin compile timesClosedshyouhei (Shyouhei Urabe)Actions

Also available in: Atom PDF