[go: up one dir, main page]

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

Remove code for pre-installed plugins & properly check if file exists #740

Merged
merged 2 commits into from
Jan 27, 2019

Conversation

Bond-009
Copy link
Member
  • Remove code for pre-installed plugins
  • Check if file exists instead of catching exceptions

Benchmarks show that catching the exceptions is way slower:

           Method |      Mean |     Error |    StdDev | Rank |
----------------- |----------:|----------:|----------:|-----:|
       FileExists |  5.249 us | 0.0417 us | 0.0390 us |    3 |
           FileEx |  4.068 us | 0.0278 us | 0.0260 us |    2 |
 FileDoesntExists |  1.193 us | 0.0046 us | 0.0041 us |    1 |
     FileDoesntEx | 27.005 us | 0.0668 us | 0.0592 us |    4 |

Copy link
Member
@anthonylavado anthonylavado left a comment

Choose a reason for hiding this comment

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

Understood. Approved!

@nvllsvm nvllsvm merged commit b4893b9 into jellyfin:master Jan 27, 2019
@Bond-009 Bond-009 deleted the deadcode branch January 27, 2019 19:21
Copy link
Contributor
@JustAMan JustAMan left a comment

Choose a reason for hiding this comment

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

I see this is already merged, but I think those changes are slightly incorrect.
They don't handle some edge cases like file being there the moment you check but removed before you read and so on. Plus did your benchmarks measure also "good" flows (i.e. when file is there), or did they only measure bad cases when file is not found?

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.

4 participants