refresh_data slow on big playlists #262

Closed
opened 2024-11-15 10:30:36 +00:00 by kae · 0 comments
Owner
File: /home/kae/mm/app/playlistmodel.py
Function: refresh_data at line 991

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
   991                                               @line_profiler.profile
   992                                               def refresh_data(self, session: db.session, dummy_for_profiling=None) -> None:
   993                                                   """Populate dicts for data calls"""
   994                                           
   995                                                   # Populate self.playlist_rows with playlist data
   996       109   14764688.0 135455.9      0.1          self.playlist_rows.clear()
   997     32512  950608686.0  29238.7      3.2          for p in PlaylistRows.get_playlist_rows(session, self.playlist_id):
   998     32403        3e+10 875031.5     96.7              self.playlist_rows[p.row_number] = RowAndTrack(p)

``` File: /home/kae/mm/app/playlistmodel.py Function: refresh_data at line 991 Line # Hits Time Per Hit % Time Line Contents ============================================================== 991 @line_profiler.profile 992 def refresh_data(self, session: db.session, dummy_for_profiling=None) -> None: 993 """Populate dicts for data calls""" 994 995 # Populate self.playlist_rows with playlist data 996 109 14764688.0 135455.9 0.1 self.playlist_rows.clear() 997 32512 950608686.0 29238.7 3.2 for p in PlaylistRows.get_playlist_rows(session, self.playlist_id): 998 32403 3e+10 875031.5 96.7 self.playlist_rows[p.row_number] = RowAndTrack(p) ```
kae added the
bug
label 2024-11-15 10:30:36 +00:00
kae referenced this issue from a commit 2024-11-16 09:58:19 +00:00
kae closed this issue 2024-11-16 09:58:19 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kae/musicmuster#262
No description provided.