The function that creates the album object takes a lot of time because it does a for-loop for every album in the database to find all the album tracks. Since I have ~6k albums and ~14k tracks, creating albums take a lot of time to complete.
To hasten this process, we can use a bisection search to get all the tracks in an album.
The function that creates the album object takes a lot of time because it does a
for-loop
for every album in the database to find all the album tracks. Since I have ~6k albums and ~14k tracks, creating albums take a lot of time to complete.To hasten this process, we can use a bisection search to get all the tracks in an album.
Like this:
None