Browse Source

Attach ReactPerf to window for easier debugging (#3318)

closed-social-v3
Nolan Lawson 7 years ago
committed by Eugen Rochko
parent
commit
a6ba004bf5
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/javascript/mastodon/performance.js

+ 3
- 1
app/javascript/mastodon/performance.js View File

@ -13,7 +13,9 @@ if (process.env.NODE_ENV === 'development') {
performance.setResourceTimingBufferSize(Infinity);
}
marky = require('marky');
require('react-addons-perf').start();
// allows us to easily do e.g. ReactPerf.printWasted() while debugging
window.ReactPerf = require('react-addons-perf');
window.ReactPerf.start();
}
export function start(name) {

Loading…
Cancel
Save