                  kwargs["tags"] = "total"
              self.tree.insert("", "end", **kwargs)
  
      def tree_clear(self):
          """ Clear the totals tree """
          logger.debug("Clearing treeview data")
          try:
              self.tree.delete(* self.tree.get_children())
              self.tree.configure(height=1)
          except tk.TclError:
 
</s> remove             self.tree.insert("", "end", **kwargs)
 </s> add             self._tree.insert("", "end", **kwargs) </s> remove             self.tree.delete(* self.tree.get_children())
            self.tree.configure(height=1)
 </s> add             self._tree.delete(* self._tree.get_children())
            self._tree.configure(height=1) </s> remove             if self.check_valid_data(values):
 </s> add             if self._check_valid_data(values): </s> remove         self.tree.configure(height=len(sessions_summary))
 </s> add         self._tree.configure(height=len(sessions_summary)) </s> remove         smooth_amount = get_config().tk_vars["smoothgraph"].get()
 </s> add         try:
            smooth_amount = self.vars["smoothgraph"].get()
        except tk.TclError:
            # Don't update when there is no value in the variable
            return
        """ Clear all of the summary data from the tree-view. """
                  kwargs["tags"] = "total"
              self.tree.insert("", "end", **kwargs)
  
      def tree_clear(self):
        """ Clear all of the summary data from the tree-view. """
          logger.debug("Clearing treeview data")
          try:
              self.tree.delete(* self.tree.get_children())
              self.tree.configure(height=1)
          except tk.TclError:
keep keep keep keep replace keep keep keep keep keep
 GUI - Stats optimization (#1067)

* Faster stat loading + caching

* Compress data in cache

* Optimize some calculations

* Vectorize smoothing

* stats.Calculations optimized

* Load latest training data from live iterator

* Add options to training graph 
lib/gui/display_analysis.py