Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up playlist manifest generation #5525

Merged
merged 4 commits into from
Dec 15, 2023
Merged

Conversation

cjcolvar
Copy link
Member

Resolves #5496

This handles low hanging fruit by reducing solr calls by:

  • Fetching all MasterFiles backing playlist items in a single SpeedyAF::Base.where
  • Using #secure_stream_infos to avoid multiple sql calls for stream tokens
  • Performing cannot? :read checks on parent MediaObjects to optimize case where multiple playlist items come from the same MediaObject

With these changes a 125 section playlist manifest generation time dropped from about 60 seconds to 8-10 seconds. Still slow but a big improvement. Playlist view page renders very quickly <1s so I didn't look into optimizing it at all.

Future optimizations could include:

  • Leveraging bulk SpeedyAF calls and the SpeedyAF proxies to avoid solr calls in test_edit and test_read in the Ability
  • Fetch all of the markers for the playlist in a single SQL call
  • Optimize (possibly via memoization) active_annotation parsing of RDF for source, start_time, and end_time of AvalonAnnotations

@cjcolvar cjcolvar force-pushed the speedy_playlists_redux branch from 1dd5621 to 70602aa Compare December 15, 2023 17:04
@cjcolvar cjcolvar force-pushed the speedy_playlists_redux branch from 70602aa to c2f11a7 Compare December 15, 2023 19:02
@cjcolvar cjcolvar force-pushed the speedy_playlists_redux branch from 0f7ad12 to 2141d74 Compare December 15, 2023 20:02
Copy link
Contributor

@masaball masaball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@cjcolvar cjcolvar merged commit c0d8cba into develop Dec 15, 2023
@cjcolvar cjcolvar deleted the speedy_playlists_redux branch December 15, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants