Remove profiling calls (again)
This commit is contained in:
parent
d30bf49c88
commit
3b71041b66
@ -10,7 +10,6 @@ import sys
|
|||||||
# PyQt imports
|
# PyQt imports
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
from sqlalchemy import (
|
from sqlalchemy import (
|
||||||
bindparam,
|
bindparam,
|
||||||
delete,
|
delete,
|
||||||
@ -246,9 +245,7 @@ class Playlists(dbtables.PlaylistsTable):
|
|||||||
"""Returns a list of all templates ordered by name"""
|
"""Returns a list of all templates ordered by name"""
|
||||||
|
|
||||||
return session.scalars(
|
return session.scalars(
|
||||||
select(cls)
|
select(cls).where(cls.is_template.is_(True)).order_by(cls.name)
|
||||||
.where(cls.is_template.is_(True))
|
|
||||||
.order_by(cls.name)
|
|
||||||
).all()
|
).all()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -577,12 +574,10 @@ class PlaylistRows(dbtables.PlaylistRowsTable):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@line_profiler.profile
|
|
||||||
def update_plr_row_numbers(
|
def update_plr_row_numbers(
|
||||||
session: Session,
|
session: Session,
|
||||||
playlist_id: int,
|
playlist_id: int,
|
||||||
sqla_map: List[dict[str, int]],
|
sqla_map: List[dict[str, int]],
|
||||||
dummy_for_profiling: Optional[int] = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Take a {plrid: row_number} dictionary and update the row numbers accordingly
|
Take a {plrid: row_number} dictionary and update the row numbers accordingly
|
||||||
|
|||||||
@ -44,7 +44,6 @@ from PyQt6.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
from pygame import mixer
|
from pygame import mixer
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
import stackprinter # type: ignore
|
import stackprinter # type: ignore
|
||||||
@ -1140,8 +1139,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
webbrowser.get("browser").open_new_tab(url)
|
webbrowser.get("browser").open_new_tab(url)
|
||||||
|
|
||||||
@line_profiler.profile
|
def paste_rows(self) -> None:
|
||||||
def paste_rows(self, dummy_for_profiling: Optional[int] = None) -> None:
|
|
||||||
"""
|
"""
|
||||||
Paste earlier cut rows.
|
Paste earlier cut rows.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -26,7 +26,6 @@ from PyQt6.QtGui import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
import obswebsocket # type: ignore
|
import obswebsocket # type: ignore
|
||||||
|
|
||||||
# import snoop # type: ignore
|
# import snoop # type: ignore
|
||||||
@ -772,9 +771,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def load_data(
|
def load_data(self, session: db.session) -> None:
|
||||||
self, session: db.session, dummy_for_profiling: Optional[int] = None
|
|
||||||
) -> None:
|
|
||||||
"""
|
"""
|
||||||
Same as refresh data, but only used when creating playslit.
|
Same as refresh data, but only used when creating playslit.
|
||||||
Distinguishes profile time between initial load and other
|
Distinguishes profile time between initial load and other
|
||||||
@ -821,13 +818,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
self.update_track_times()
|
self.update_track_times()
|
||||||
self.invalidate_rows(row_numbers)
|
self.invalidate_rows(row_numbers)
|
||||||
|
|
||||||
@line_profiler.profile
|
def move_rows(self, from_rows: list[int], to_row_number: int) -> None:
|
||||||
def move_rows(
|
|
||||||
self,
|
|
||||||
from_rows: list[int],
|
|
||||||
to_row_number: int,
|
|
||||||
dummy_for_profiling: Optional[int] = None,
|
|
||||||
) -> None:
|
|
||||||
"""
|
"""
|
||||||
Move the playlist rows given to to_row and below.
|
Move the playlist rows given to to_row and below.
|
||||||
"""
|
"""
|
||||||
@ -892,13 +883,11 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
self.update_track_times()
|
self.update_track_times()
|
||||||
self.invalidate_rows(list(row_map.keys()))
|
self.invalidate_rows(list(row_map.keys()))
|
||||||
|
|
||||||
@line_profiler.profile
|
|
||||||
def move_rows_between_playlists(
|
def move_rows_between_playlists(
|
||||||
self,
|
self,
|
||||||
from_rows: list[int],
|
from_rows: list[int],
|
||||||
to_row_number: int,
|
to_row_number: int,
|
||||||
to_playlist_id: int,
|
to_playlist_id: int,
|
||||||
dummy_for_profiling: Optional[int] = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Move the playlist rows given to to_row and below of to_playlist.
|
Move the playlist rows given to to_row and below of to_playlist.
|
||||||
@ -1071,10 +1060,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
# Update display
|
# Update display
|
||||||
self.invalidate_row(track_sequence.previous.row_number)
|
self.invalidate_row(track_sequence.previous.row_number)
|
||||||
|
|
||||||
@line_profiler.profile
|
def refresh_data(self, session: db.session) -> None:
|
||||||
def refresh_data(
|
|
||||||
self, session: db.session, dummy_for_profiling: Optional[int] = None
|
|
||||||
) -> None:
|
|
||||||
"""
|
"""
|
||||||
Populate self.playlist_rows with playlist data
|
Populate self.playlist_rows with playlist data
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,6 @@ from PyQt6.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
|
|
||||||
# App imports
|
# App imports
|
||||||
from audacity_controller import AudacityController
|
from audacity_controller import AudacityController
|
||||||
@ -378,10 +377,7 @@ class PlaylistTab(QTableView):
|
|||||||
# Deselect edited line
|
# Deselect edited line
|
||||||
self.clear_selection()
|
self.clear_selection()
|
||||||
|
|
||||||
@line_profiler.profile
|
def dropEvent(self, event: Optional[QDropEvent]) -> None:
|
||||||
def dropEvent(
|
|
||||||
self, event: Optional[QDropEvent], dummy_for_profiling: Optional[int] = None
|
|
||||||
) -> None:
|
|
||||||
"""
|
"""
|
||||||
Move dropped rows
|
Move dropped rows
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user