I'm migrating my tumblr blog to docpad and have started with this boilerplate: https://github.com/ervwalter/ewalnet-docpad
Now my problem is that "docpad run" takes 58s to run, and a livereload run takes 23s. I wrote the author of this boilerplate and he says he is having the same, but it doesn't bother him too much.
But I don't want to wait half a minute for every change in a blog post to see how it looks like, so I'm trying to make it faster. I tried profiling with nodetime but I don't see a drilldown per method or so. My assumption is that the time is lost in the partials, at it sends the whole posts to the partials
How can I profile Docpad so I see where the time is lost? I know the question is very broad, but all I found on performance optimizing on DocPad is that you should make Docpad not to parse static files.
Update the missing link was that I needed to start the CPU profiler
on nodetime:
- configure nodetime, described here
- start
CPU profiler
on nodetime - start docpad:
docpad --profile run
Unfortunately in my case the output is not much helping. The results of my run reveal that 81% of the time is spent in ambi.js
, which seems is just a intermediate layer which calls functions. I could not find out which functions are called, adding console.log(fireMethod.toString())
I only see
function () { [native code] }
so I'm not really further. How can I find out where the time is actually spent? For reference: here is my v8.log
Also, I'm a bit worried, that docpad almost only relies on modules written by Benjamin Lupton. Why is that so?