Avoid zero initialization of Blob:

This seemed to improve the performance of the copy, although there did seem to be some byte by byte copying still present. Further investigation recommended.
This commit is contained in:
Donovan Hide
2014-10-31 18:38:04 +00:00
committed by Vinnie Falco
parent e4c9822d78
commit bffb5ef8b4

View File

@@ -84,9 +84,7 @@ NodeObject::Ptr DecodedBlob::createObject ()
if (m_success)
{
Blob data (m_dataBytes);
memcpy (data.data (), m_objectData, m_dataBytes);
Blob data(m_objectData, m_objectData + m_dataBytes);
object = NodeObject::createObject (
m_objectType, m_ledgerIndex, std::move(data), uint256::fromVoid(m_key));