I port my tumblr blog to docpad and started with this template: https://github.com/ervwalter/ewalnet-docpad
Now my problem is that "docpad run" takes 58 seconds to start, and starting in left mode takes 23 seconds. I wrote the author of this template, and he says that he has the same thing, but he does not bother him too much.
But I donβt want to wait half a minute for every change in the blog to see what it looks like, so I'm trying to make it faster. I tried profiling with nodetime, but I donβt see the granularity by the method or so. My assumption is that time is wasted in partial, while whole messages are sent in partial
How can I profile Docpad to see where time is wasted? I know that the question is very broad, but all I found when optimizing performance on DocPad is that you should force Docpad not to analyze static files.
Update the missing link was that I needed to run 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 does not help much. The results of my launch show that 81% of the time is spent in ambi.js , which seems to be just an intermediate level that calls functions. I could not find out what functions are calling by adding console.log(fireMethod.toString()) , I only see
function () { [native code] }
so I'm not much further. How can I find out where the time is actually spent? For reference: here is my v8.log
Also, I'm a little worried that docpad almost only relies on modules written by Benjamin Lupton. Why is this so?
source share