From 58e244af21d4c3233e1aa65c62a5e5a2f2cca00b Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Thu, 6 Mar 2025 14:30:03 +0000 Subject: [PATCH] Add profiling information for moving rows --- app/musicmuster.py | 4 +++- app/playlists.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/musicmuster.py b/app/musicmuster.py index cd0c312..a238059 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -57,6 +57,7 @@ from PyQt6.QtWidgets import ( ) # Third party imports +import line_profiler from pygame import mixer from sqlalchemy.orm.session import Session import stackprinter # type: ignore @@ -2113,7 +2114,8 @@ class Window(QMainWindow): webbrowser.get("browser").open_new_tab(url) - def paste_rows(self) -> None: + @line_profiler.profile + def paste_rows(self, dummy_for_profiling: int | None = None) -> None: """ Paste earlier cut rows. """ diff --git a/app/playlists.py b/app/playlists.py index 1de3892..3dc9413 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -31,6 +31,7 @@ from PyQt6.QtWidgets import ( ) # Third party imports +import line_profiler # App imports from audacity_controller import AudacityController @@ -357,7 +358,8 @@ class PlaylistTab(QTableView): # Deselect edited line self.clear_selection() - def dropEvent(self, event: Optional[QDropEvent]) -> None: + @line_profiler.profile + def dropEvent(self, event: Optional[QDropEvent], dummy: int | None = None) -> None: """ Move dropped rows """