Remove expensive args from profile markers
Summary: public We were adding all the arguments passed to all the JS functions and callbacks called over the bridge to marker names, and this args can be huge, meaning a lot of time spent stringifying arguments and therefore less accurate profile results Reviewed By: nicklockwood Differential Revision: D2761809 fb-gh-sync-id: 2d0b5b90cc9e59fe491c108b0360b84ab5fee5b7
This commit is contained in:
parent
8457a46e43
commit
f5673026f4
|
@ -154,7 +154,7 @@ class MessageQueue {
|
|||
method = this._methodTable[module][method];
|
||||
module = this._moduleTable[module];
|
||||
}
|
||||
Systrace.beginEvent(() => `${module}.${method}(${stringifySafe(args)})`);
|
||||
Systrace.beginEvent(`${module}.${method}()`);
|
||||
if (__DEV__ && SPY_MODE) {
|
||||
console.log('N->JS : ' + module + '.' + method + '(' + JSON.stringify(args) + ')');
|
||||
}
|
||||
|
@ -169,8 +169,7 @@ class MessageQueue {
|
|||
}
|
||||
|
||||
__invokeCallback(cbID, args) {
|
||||
Systrace.beginEvent(
|
||||
() => `MessageQueue.invokeCallback(${cbID}, ${stringifySafe(args)})`);
|
||||
Systrace.beginEvent(`MessageQueue.invokeCallback(${cbID})`);
|
||||
this._lastFlush = new Date().getTime();
|
||||
let callback = this._callbacks[cbID];
|
||||
if (!callback || __DEV__) {
|
||||
|
|
Loading…
Reference in New Issue