Speed up BaseItem deserialization

pull/1642/head
Claus Vium 6 years ago
parent 685e9e4f58
commit e7c05dcfaf

@ -1298,20 +1298,15 @@ namespace Emby.Server.Implementations.Data
if (TypeRequiresDeserialization(type)) if (TypeRequiresDeserialization(type))
{ {
using (var stream = new MemoryStream(reader[1].ToBlob()))
{
stream.Position = 0;
try try
{ {
item = _jsonSerializer.DeserializeFromStream(stream, type) as BaseItem; item = _jsonSerializer.DeserializeFromString(reader[1].ToString(), type) as BaseItem;
} }
catch (SerializationException ex) catch (SerializationException ex)
{ {
Logger.LogError(ex, "Error deserializing item"); Logger.LogError(ex, "Error deserializing item");
} }
} }
}
if (item == null) if (item == null)
{ {

Loading…
Cancel
Save