          self.columns = self.tree_configure(helptext)
          self.canvas.bind("<Configure>", self.resize_frame)
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      def add_label(self):
          """ Add tree-view Title """
          logger.debug("Adding Treeview title")
          lbl = ttk.Label(self.sub_frame, text="Session Stats", anchor=tk.CENTER)
          lbl.pack(side=tk.TOP, fill=tk.X, padx=5, pady=5)
  
      def resize_frame(self, event):
 
</s> remove         lbl = ttk.Label(self.sub_frame, text="Session Stats", anchor=tk.CENTER)
 </s> add         lbl = ttk.Label(self._sub_frame, text="Session Stats", anchor=tk.CENTER) </s> remove     def resize_frame(self, event):
        """ Resize the options frame to fit the canvas """
 </s> add     def _resize_frame(self, event):
        """ Resize the options frame to fit the canvas.

        Parameters
        ----------
        event: `tkinter.Event`
            The tkinter resize event
        """ </s> remove         self.session = None  # set when loading or clearing from parent
        self.thread = None  # Thread for loading data popup
        self.selected_id = selected_id
        self.popup_positions = list()

        self.canvas = tk.Canvas(self, bd=0, highlightthickness=0)
        self.canvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

        self.tree_frame = ttk.Frame(self.canvas)
        self.tree_canvas = self.canvas.create_window((0, 0), window=self.tree_frame, anchor=tk.NW)
        self.sub_frame = ttk.Frame(self.tree_frame)
        self.sub_frame.pack(side=tk.LEFT, fill=tk.X, anchor=tk.N, expand=True)

        self.add_label()
        self.tree = ttk.Treeview(self.sub_frame, height=1, selectmode=tk.BROWSE)
        self.scrollbar = ttk.Scrollbar(self.tree_frame, orient="vertical", command=self.tree.yview)
        self.scrollbar.pack(side=tk.RIGHT, fill=tk.Y)

        self.columns = self.tree_configure(helptext)
        self.canvas.bind("<Configure>", self.resize_frame)
 </s> add  </s> remove         """ Add the option buttons """
 </s> add         """ Add the option buttons.

        Returns
        -------
        dict
            The button names to button objects
        """
        buttons = dict() </s> remove         self._add_buttons()
 </s> add         self._buttons = self._add_buttons()
        self._add_training_callback()
    def _add_label(self):
        """ Add the title above the tree-view. """
          self.columns = self.tree_configure(helptext)
          self.canvas.bind("<Configure>", self.resize_frame)
          logger.debug("Initialized: %s", self.__class__.__name__)
  
    def _add_label(self):
        """ Add the title above the tree-view. """
    def _add_label(self):
        """ Add the title above the tree-view. """
          logger.debug("Adding Treeview title")
          lbl = ttk.Label(self.sub_frame, text="Session Stats", anchor=tk.CENTER)
          lbl.pack(side=tk.TOP, fill=tk.X, padx=5, pady=5)
  
      def resize_frame(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