refactor: optimize RBF heatmap performance by decoupling grid resolution from viewport size and update UI file handling.
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import Property, QObject, Qt, QTimer, Signal, Slot
|
||||
@@ -258,8 +259,6 @@ class SessionController(QObject):
|
||||
@Slot(str)
|
||||
@slot_error_boundary
|
||||
def loadFile(self, file_path: str) -> None:
|
||||
from pathlib import Path
|
||||
|
||||
from pygui.backend.data.data_records import (
|
||||
is_official_csv,
|
||||
read_data_records,
|
||||
@@ -348,8 +347,6 @@ class SessionController(QObject):
|
||||
@slot_error_boundary
|
||||
def compareFiles(self, file_a: str, file_b: str) -> None:
|
||||
"""Run DTW comparison between two CSV files and emit result."""
|
||||
from pathlib import Path
|
||||
|
||||
from pygui.backend.comparison import compare_runs
|
||||
from pygui.backend.data.data_records import is_official_csv, read_data_records, read_official_csv
|
||||
|
||||
@@ -603,14 +600,6 @@ class SessionController(QObject):
|
||||
return average_clusters(edited, getattr(self, "_active_clusters", []))
|
||||
return edited
|
||||
|
||||
# TODO P2.4: throttle live-frame UI updates to ~30Hz
|
||||
# THINKING: every decoded serial frame triggers frameUpdated/stateChanged,
|
||||
# which repaints WaferMapItem + trend chart; at high stream rates the GUI
|
||||
# thread saturates on paint, not decode. Buffer the latest frame and flush
|
||||
# via a 33ms QTimer (latest-wins, no queue growth). Recording must keep
|
||||
# writing every frame — only the UI emit is throttled, so place the timer
|
||||
# here rather than in StreamReader. Depends on nothing; verify with P4.3.
|
||||
# See docs/pending/alpha-release-polish-plan.md §2.4.
|
||||
def _emit_current(self) -> None:
|
||||
frame = self._player.current()
|
||||
if frame is None:
|
||||
|
||||
Reference in New Issue
Block a user