Commit fe238a06 authored by loislo@chromium.org's avatar loislo@chromium.org

DevTools: Timeline: speed-up records processing.

It was awfully slow because we updated selection and calculated aggregates for every added record.
So the complexity was at least n^2.
I moved the _updateSearchHighlight call to _onRecordingStopped

BUG=

Review URL: https://codereview.chromium.org/703113003

git-svn-id: svn://svn.chromium.org/blink/trunk@184909 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 118ee672
...@@ -814,23 +814,19 @@ WebInspector.TimelinePanel.prototype = { ...@@ -814,23 +814,19 @@ WebInspector.TimelinePanel.prototype = {
} }
this._hideProgressPane(); this._hideProgressPane();
this._overviewPane.update(); this._overviewPane.update();
}, this._updateSearchHighlight(false, true);
_onRecordAdded: function(event)
{
this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event.data));
}, },
/** /**
* @param {!WebInspector.TimelineModel.Record} record * @param {!WebInspector.Event} event
*/ */
_addRecord: function(record) _onRecordAdded: function(event)
{ {
var record = /** @type {!WebInspector.TimelineModel.Record} */ (event.data);
if (this._lazyFrameModel && !this._tracingModel) if (this._lazyFrameModel && !this._tracingModel)
this._lazyFrameModel.addRecord(record); this._lazyFrameModel.addRecord(record);
for (var i = 0; i < this._currentViews.length; ++i) for (var i = 0; i < this._currentViews.length; ++i)
this._currentViews[i].addRecord(record); this._currentViews[i].addRecord(record);
this._updateSearchHighlight(false, true);
}, },
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment