      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:
              # Catch non-existent tree view when rebuilding the GUI
              pass
  
      def select_item(self, event):
 
</s> remove         """ Clear the totals tree """
 </s> add         """ Clear all of the summary data from the tree-view. """ </s> remove             self.tree.insert("", "end", **kwargs)
 </s> add             self._tree.insert("", "end", **kwargs) </s> remove     def select_item(self, event):
        """ Update the session summary info with
            the selected item or launch graph """
        region = self.tree.identify("region", event.x, event.y)
        selection = self.tree.focus()
        values = self.tree.item(selection, "values")
 </s> add     def _select_item(self, event):
        """ Update the session summary info with the selected item or launch graph.

        If the mouse is clicked on the graph icon, then the session summary pop-up graph is
        launched. Otherwise the selected ID is stored.

        Parameters
        ----------
        event: :class:`tkinter.Event`
            The tkinter mouse button release event
        """
        region = self._tree.identify("region", event.x, event.y)
        selection = self._tree.focus()
        values = self._tree.item(selection, "values") </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 </s> remove         self.tree.configure(height=len(sessions_summary))
 </s> add         self._tree.configure(height=len(sessions_summary))
            self._tree.delete(* self._tree.get_children())
            self._tree.configure(height=1)
      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)
            self._tree.delete(* self._tree.get_children())
            self._tree.configure(height=1)
          except tk.TclError:
              # Catch non-existent tree view when rebuilding the GUI
              pass
  
      def select_item(self, event):
keep keep keep keep replace 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