Repository: incubator-htrace Updated Branches: refs/heads/master 55c7f39ea -> 9c683a42e
HTRACE-193. gui: avoid doing multiple redraws when spanResults is updated, trim logs (cmccabe) Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/9c683a42 Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/9c683a42 Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/9c683a42 Branch: refs/heads/master Commit: 9c683a42e5b79e82c30ad704372f1abc9873ce75 Parents: 55c7f39 Author: Colin Patrick Mccabe <[email protected]> Authored: Thu Jun 18 13:45:21 2015 -0700 Committer: Colin Patrick Mccabe <[email protected]> Committed: Thu Jun 18 13:45:21 2015 -0700 ---------------------------------------------------------------------- htrace-webapp/src/main/web/app/search_results_view.js | 7 +++++-- htrace-webapp/src/main/web/app/span_group_widget.js | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/9c683a42/htrace-webapp/src/main/web/app/search_results_view.js ---------------------------------------------------------------------- diff --git a/htrace-webapp/src/main/web/app/search_results_view.js b/htrace-webapp/src/main/web/app/search_results_view.js index 111f530..9275d89 100644 --- a/htrace-webapp/src/main/web/app/search_results_view.js +++ b/htrace-webapp/src/main/web/app/search_results_view.js @@ -30,11 +30,14 @@ htrace.SearchResultsView = Backbone.View.extend({ initialize: function(options) { this.searchResults = options.searchResults; this.el = options.el; - this.listenTo(this.searchResults, 'add remove change reset', this.render); + var view = this; + this.listenTo(this.searchResults, 'add remove change reset', + _.debounce(function() { + view.render(); + }, 10)); // Re-render the canvas when the window size changes. // Add a debouncer delay to avoid spamming render requests. - var view = this; $(window).on("resize", _.debounce(function() { view.render(); }, 250)); http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/9c683a42/htrace-webapp/src/main/web/app/span_group_widget.js ---------------------------------------------------------------------- diff --git a/htrace-webapp/src/main/web/app/span_group_widget.js b/htrace-webapp/src/main/web/app/span_group_widget.js index e32c2db..ad0b482 100644 --- a/htrace-webapp/src/main/web/app/span_group_widget.js +++ b/htrace-webapp/src/main/web/app/span_group_widget.js @@ -80,7 +80,6 @@ htrace.SpanGroupWidget = function(params) { var parentTreeHeight = htrace.treeHeight(this.span, htrace.getReifiedParents); - console.log("parentTreeHeight = " + parentTreeHeight); // Traverse the parents tree upwards. var thisWidget = this; htrace.treeTraverseDepthFirstPost(this.span, htrace.getReifiedParents, 0, @@ -100,11 +99,5 @@ htrace.SpanGroupWidget = function(params) { } }); this.yF = this.spanY + 4; - console.log("SpanGroupWidget(this.span=" + - JSON.stringify(this.span.unparse()) + - ", x0=" + this.x0 + ", xB=" + this.xB + - ", xD=" + this.xD + ", xF=" + this.xF + - ", y0=" + this.y0 + ", yF=" + this.yF + - ")"); return this; };
