Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
prevent unnecessary recursion during trace
Browse files Browse the repository at this point in the history
  • Loading branch information
ghempton committed Oct 1, 2016
1 parent b52576d commit 495c3bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,11 @@ Trace.prototype.getAllLoadRecords = function(canonical, traceOpts, canonicalCond
var self = this;
return this.getLoadRecord(canonical, traceOpts, parentStack)
.then(function(load) {

// check this again – might have been loaded asynchronously since the last check
if (canonical in curLoads)
return curLoads;

// conditionals, build: false and system modules are falsy loads in the trace trees
// (that is, part of depcache, but not built)
// we skip system modules though
Expand Down

0 comments on commit 495c3bb

Please sign in to comment.