mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #1642 from cvium/fix_slow_db
Speed up BaseItem deserialization
This commit is contained in:
commit
4bb0c2d053
@ -1298,20 +1298,15 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
if (TypeRequiresDeserialization(type))
|
||||
{
|
||||
using (var stream = new MemoryStream(reader[1].ToBlob()))
|
||||
{
|
||||
stream.Position = 0;
|
||||
|
||||
try
|
||||
{
|
||||
item = _jsonSerializer.DeserializeFromStream(stream, type) as BaseItem;
|
||||
item = _jsonSerializer.DeserializeFromString(reader.GetString(1), type) as BaseItem;
|
||||
}
|
||||
catch (SerializationException ex)
|
||||
{
|
||||
Logger.LogError(ex, "Error deserializing item");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user