Join GitHub today
Recompile site time got worse between 4.1.6 and 4.2.3 #901
our Nanoc site takes about 90 seconds to compile from scratch with Nanoc 4.2.3. Rebuilding the site without changing any files on disk performance changed rather dramatically between the latest versions of Nanoc. Here are a couple of timings created on a Ubuntu VM using Ruby 2.3.1. The only thing that changed during these runs is the Nanoc version.
I wonder how we should go about this. If you want I can get you access to the code, or I can create kcachegrind outputs using ruby-prof while running the recompile. I previsouly had some success with it stripping off 30 seconds by changing a single line of code.
Let me know what you think!
I only started using ruby-prof two weeks ago so things might have changed. While text reporting is nice for things like GH issues, I really like that there is a visual frontend with drilldown functionality: https://kcachegrind.github.io/html/Screenshots.html
Just as a suggestion when text/graphviz doesn't cut it. I at last was only able to find the issue using a UI.
In case you're interested, this diff cut 30 secs off our build:
def nesting_level(item = @item) - item.identifier.components.count + item.identifier.to_s.count('/') end
FYI, stackprof unfortunately doesn't work on Windows. tmm1/stackprof#45
It's not an issue for me as I have a Linux VM handy, but Windows-only users might suffer from it in the future in case you tell them to submit profiling information.