Compare commits

...

3 Commits

Author SHA1 Message Date
Keith Edmunds
c4c0ef065b Merge and restart profiling 2024-11-21 18:26:33 +00:00
Keith Edmunds
3a2fbe110f merge conflicts 2024-11-21 18:24:11 +00:00
Keith Edmunds
6879950c68 Re-add profiling calls 2024-11-21 18:21:44 +00:00
3 changed files with 9 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import sys
# PyQt imports
# Third party imports
import line_profiler
from sqlalchemy import (
bindparam,
delete,
@ -563,8 +564,9 @@ class PlaylistRows(dbtables.PlaylistRowsTable):
)
@staticmethod
@line_profiler.profile
def update_plr_row_numbers(
session: Session, playlist_id: int, sqla_map: List[dict[str, int]]
session: Session, playlist_id: int, sqla_map: List[dict[str, int]], dummy_for_profiling=None
) -> None:
"""
Take a {plrid: row_number} dictionary and update the row numbers accordingly

View File

@ -44,6 +44,7 @@ from PyQt6.QtWidgets import (
)
# Third party imports
import line_profiler
import pipeclient
from pygame import mixer
from sqlalchemy.exc import IntegrityError
@ -1068,7 +1069,8 @@ class Window(QMainWindow, Ui_MainWindow):
else:
webbrowser.get("browser").open_new_tab(url)
def paste_rows(self) -> None:
@line_profiler.profile
def paste_rows(self, dummy_for_profiling=None) -> None:
"""
Paste earlier cut rows.
"""

View File

@ -26,6 +26,7 @@ from PyQt6.QtGui import (
)
# Third party imports
import line_profiler
import obswebsocket # type: ignore
# import snoop # type: ignore
@ -975,7 +976,8 @@ class PlaylistModel(QAbstractTableModel):
# Update display
self.invalidate_row(track_sequence.previous.row_number)
def refresh_data(self, session: db.session) -> None:
@line_profiler.profile
def refresh_data(self, session: db.session, dummy_for_profiling=None) -> None:
"""Populate self.playlist_rows with playlist data"""
# We used to clear self.playlist_rows each time but that's