lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

reverted base-trie-on-disk #321

Closed BrannonKing closed 5 years ago

BrannonKing commented 5 years ago

It wasn't substantially better so I yanked it. It was theoretically better, but it didn't look better by the numbers. It's going to take a substantial number of claims to make the capped leveldb approach better, and before that happens we'll have done the sqlite backing.

BrannonKing commented 5 years ago

For review, I want to note the previous copy method:

void CClaimTrieCacheHashFork::copyAllBaseToCache()
{
    recurseNodes({}, [this](const std::string& name, const CClaimTrieData& data) {
        if (nodesAlreadyCached.insert(name).second)
            nodesToAddOrUpdate.insert(name, data);
    });

    for (auto it = nodesToAddOrUpdate.begin(); it != nodesToAddOrUpdate.end(); ++it) {
        it->hash.SetNull();
        it->flags |= CClaimTrieDataFlags::HASH_DIRTY;
    }
}
BrannonKing commented 5 years ago

removing in favor of memory branch