Dumps a heap snapshot for each event in docpad, viewable in chrome profiler

HeapDump Plugin for DocPad

Generates heap snapshots during specified docpad events that can be loaded in to the chrome profiler. Snapshot files are generated in the root of docpad by default

        # default output path relative to the docpad root path
        snapshotPath: "snapshots"
        # default events that this plugin write a snapshot at (change to suit your docpad instance)
        events: [
            'writeAfter' # (default)
Events that can be used
    'writeAfter' # (default)
  • Generate a snapshot heap and make some changes i.e. turn off the docpad logger
  • Generate another snapshot then compare these snapshots using chrome (due to a bug in chrome at time of writing this tip I use Chrome Canary to compare snapshots)

To compare in chrome canary do this:

  • Open chrome canary, goto the dev tools->profiles tab.
  • Right click on the word "Profiles" hightlighted in blue (on the left side).
  • Choose load and find your snapshots
  • Add the two snapshots in ascending date order i.e. "before" then "after". (the order of loading is very important)
  • Now view the latest snapshot (will be second in the list on the left)
  • Where it says "summary" at the bottom, change it to "comparision".
  • Chrome should automatially make the comparision and show the results

You can discover the history inside the file

You can discover the contributing instructions inside the file

Licensed under the incredibly permissive MIT License
Copyright © 2013+ Stringz Solutions Ltd
Copyright © 2013+ Peter Flannery