Skip to content

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.

17 points51 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
17 · 100% up
Kind
Text
ID
3mbed2

Author

12
posts
36
comments
0
media
View profile

52 comments

Probably not the problem but you are using -j argument?

12 points

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

10 points

To give you a comprehensive answer:

  • dstat (paging? context switches?)
  • iostat -xm 1
  • strace -f -T <...> (fsyncs?)

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).

5 points

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

1 points

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.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.