diff --git a/htrace-htraced/src/web/app/search_results_view.js b/htrace-htraced/src/web/app/search_results_view.js index 111f530..9275d89 100644 --- a/htrace-htraced/src/web/app/search_results_view.js +++ b/htrace-htraced/src/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)); diff --git a/htrace-htraced/src/web/app/span_group_widget.js b/htrace-htraced/src/web/app/span_group_widget.js index e32c2db..1158955 100644 --- a/htrace-htraced/src/web/app/span_group_widget.js +++ b/htrace-htraced/src/web/app/span_group_widget.js @@ -80,7 +80,7 @@ htrace.SpanGroupWidget = function(params) { var parentTreeHeight = htrace.treeHeight(this.span, htrace.getReifiedParents); - console.log("parentTreeHeight = " + parentTreeHeight); +// console.log("parentTreeHeight = " + parentTreeHeight); // Traverse the parents tree upwards. var thisWidget = this; htrace.treeTraverseDepthFirstPost(this.span, htrace.getReifiedParents, 0, @@ -100,11 +100,11 @@ 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 + - ")"); +// 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; };