about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNolan Lawson <nolan@nolanlawson.com>2017-05-25 09:59:18 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-05-25 18:59:18 +0200
commit33d73387793674d955d8ec244ca099ba5a9ef97e (patch)
tree5b92842cdc2943ee831ae0a61eea47f0156b82d4
parentcf4fe6cab86384971d4b7bd634f48b0a462efd48 (diff)
Fix Firefox issue with performance marks (#3315)
-rw-r--r--app/javascript/mastodon/performance.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js
index 64fd47bb3..4e89c2196 100644
--- a/app/javascript/mastodon/performance.js
+++ b/app/javascript/mastodon/performance.js
@@ -7,6 +7,11 @@
 let marky;
 
 if (process.env.NODE_ENV === 'development') {
+  if (typeof performance !== 'undefined' && performance.setResourceTimingBufferSize) {
+    // Increase Firefox's performance entry limit; otherwise it's capped to 150.
+    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1331135
+    performance.setResourceTimingBufferSize(Infinity);
+  }
   marky = require('marky');
   require('react-addons-perf').start();
 }