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

Reduce bottlenecks scan code #9863

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Reduce bottlenecks scan code #9863

merged 1 commit into from
Jun 22, 2023

Conversation

Bond-009
Copy link
Member

@Bond-009 Bond-009 commented Jun 6, 2023

  • Removes MetadataThrottler, we already limit the amount of directories to start scanning (this PR multiplies this limit by 2) in and the number of ffprobe instances, this extra throttling doesn't seem necessary.
  • Increases the amount of thumbnail extraction processes from 2 to 2 * the number of threads

@crobibero crobibero merged commit 3982b0e into jellyfin:master Jun 22, 2023
16 checks passed
@@ -809,27 +808,12 @@ private bool IsSaverEnabledForItem(IMetadataSaver saver, BaseItem item, LibraryO
{
var results = await provider.GetSearchResults(searchInfo, cancellationToken).ConfigureAwait(false);

var list = results.ToList();
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple enumeration was introduced here and as a result potential bugs.
As I see, most of GetSearchResults implementations return arrays and there is no problem in this case.
But at least MusicBrainzArtistProvider returns a lazy enumeration using yield statement. And here we have a bug:
MusicBrainzArtistProvider lazily creates RemoteSearchResult while we iterate here to set item.SearchProviderName and then it creates new ones when we iterate this enumerable again outside. So we actually lose SearchProviderName

But I haven't tested yet

@Bond-009 Bond-009 deleted the scan branch August 26, 2023 15:34
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.

None yet

4 participants