[PR #9078] Migrate to IHost #11968

Closed
opened 2026-02-07 06:47:44 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/9078

State: closed
Merged: Yes


Redo of #7347

Using IHost and IHostBuilder is the recommended way to configure the application host.

When using IHost, it is no longer possible to use DI in Startup.cs, except for IConfiguration, IHostEnvironment, and IWebEnvironment, so startup initialization is now done manually

This should decrease the startup time of Jellyfin since the ServiceProvider is no longer created twice, but I haven't measured it.

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/9078 **State:** closed **Merged:** Yes --- Redo of #7347 Using `IHost` and `IHostBuilder` is the [recommended](https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30?tabs=visual-studio#hostbuilder-replaces-webhostbuilder) way to configure the application host. When using `IHost`, it is no longer possible to use DI in Startup.cs, except for `IConfiguration`, `IHostEnvironment`, and `IWebEnvironment`, so startup initialization is now done manually This should decrease the startup time of Jellyfin since the ServiceProvider is no longer created twice, but I haven't measured it.
OVERLORD added the pull-request label 2026-02-07 06:47:44 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11968