What's usually the bottleneck to compilation times?
I'm currently compiling atom-editor from the aur, and needless to say, it takes quite a while. I checked:
-
CPU: No core is at more than 15% load
-
RAM: Still plenty available
-
iotop: Almost nothing happening here at all
So where is the bottleneck here? What's stopping my compilation from being a lot faster?
edit: Forgot to mention this, I'm even using ccache on top of that.
Edited 25 Sep 2015. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 17 · 100% up
- Kind
- Text
- ID
- 3mbed2
52 comments
Probably not the problem but you are using -j argument?
For what exactly?
-jis a parameter ofmakethat controls the parallelism. But is atom built withmakeor something that at least respectsMAKEFLAGS? I don't know.Have you configured MAKEFLAGS in /etc/makepkg.conf?
make. By default it does every recipe in a serial fashion.
atom-editor barely compiles anything so you're asking the wrong question. Almost all of the atom-editor build time is downloading and installing npm modules
Mh, that might be true, but then what's stopping the installation of the npm modules from being a lot faster?
Could be saturation of npm. Waiting in line.
To give you a comprehensive answer:
You'll find that usually npm is waiting on network or extracting and copying files, sometimes building stuff which then usually depends on gathering files and a bit of compiling time.
For example you could test what happens if you use a HTTP cache (you might need some additional trickery because npm probably uses https), and then try using a tmpfs partition (but maybe npm uses /tmp a lot, so you might need to mount a ramdisk over that).
I'm already using a local dns server so I guess my time would be a bit better than normal already, but I'll check it out. Thanks
DNS resolution is just ~500 ms somewhere, npm uses one host.
I wish I knew. But what I can say is that the package atom-bin is a lot faster (obviously since it doesn't have to compile.) That doesn't help your general case, but since Atom was the worst compile time AUR offender I had, I'm still happy to have switched.
Make an issue for atom developers?