How can decrease time of creating and insert in boost::interprocess::map?

In the below code I unpack a msgpack file to std::map. The duration of this process is almost 85 seconds.

#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <exception>
#include <msgpack.hpp>
#include <boost/variant.hpp>
#include <boost/filesystem.hpp>

using namespace std::literals;
namespace fs = boost::filesystem;

enum class TYPE_MSG : int
{
    NULLPTR_,
    INT64_,
    DOUBLE_,
    STRING_,
    VECTOR_,
    MAP_,
};

class MOVar;
typedef boost::variant<std::nullptr_t, int64_t, double, std::string, std::vector<MOVar>, std::map<std::string, MOVar>> MOVarST;
class MOVar : public MOVarST
{
public:
    MOVar() : MOVarST(nullptr) {}
    MOVar(double b) { MOVarST::operator=(b); }
    MOVar(int64_t b) { MOVarST::operator=(b); }
    MOVar(int b) : MOVar(static_cast<int64_t>(b)) {}
    MOVar(std::string &&b) { MOVarST::operator=(b); }
    MOVar(std::vector<MOVar> &b) { MOVarST::operator=(b); }
    MOVar(std::map<std::string, MOVar> &b) { MOVarST::operator=(b); }

    const MOVar &operator=(const int64_t &b) { MOVarST::operator=(b); return *this; }
    const MOVar &operator=(std::string &&b) { MOVarST::operator=(std::move(b)); return *this; }
    const MOVar &operator=(std::string &b) { MOVarST::operator=(std::move(b)); return *this; }
    const MOVar &operator=(const double &b) { MOVarST::operator=(b); return *this; }
    const MOVar &operator=(std::vector<MOVar> &&b) { MOVarST::operator=(std::move(b)); return *this; }
    const MOVar &operator=(std::map<std::string, MOVar> &&b) { MOVarST::operator=(std::move(b)); return *this; }

    bool is_map() const { return which() == (int)TYPE_MSG::MAP_; }
    bool is_int64() const { return which() == (int)TYPE_MSG::INT64_; }
    bool is_nill() const { return which() == (int)TYPE_MSG::NULLPTR_; }
    bool is_double() const { return which() == (int)TYPE_MSG::DOUBLE_; }
    bool is_string() const { return which() == (int)TYPE_MSG::STRING_; }
    bool is_vector() const { return which() == (int)TYPE_MSG::VECTOR_; }

    const double &_as_double() const { return boost::get<double>(*this); }
    const int64_t &_as_int64() const { return boost::get<int64_t>(*this); }
    const std::string &_as_string() const { return boost::get<std::string>(*this); }
    const std::vector<MOVar> &_as_vector() const { return boost::get<std::vector<MOVar>>(*this); }
    const std::map<std::string, MOVar> &_as_map() const { return boost::get<std::map<std::string, MOVar>>(*this); }

private:
};

void convert_msgpack_to_movar(msgpack::object const &o, MOVar &v);

namespace msgpack
{
    MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)
    {
        namespace adaptor
        {
            template <>
            struct convert<MOVar>
            {
                msgpack::object const &operator()(msgpack::object const &o, MOVar &v) const
                {
                    convert_msgpack_to_movar(o, v);
                    return o;
                }
            };
    }
    }
}

int main()
{
    std::map<std::string, MOVar> map;
    auto fileName = "big_map.msgpack"s;

    auto startTime = std::chrono::high_resolution_clock::now();
    {
        std::ifstream file(fileName, std::ios::binary);
        auto fileSize = fs::file_size(fileName);
        std::vector<char> buffer(fileSize);
        file.read(buffer.data(), fileSize);

        msgpack::object_handle oh = msgpack::unpack(buffer.data(), fileSize);
        msgpack::object deserialized = oh.get();
        deserialized.convert(map);
    }
    auto endTime = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::seconds>(endTime - startTime);
    std::cout << "Duration: " << duration.count() << " seconds" << std::endl;
}


But when I try to replace std::map with bip::map, the time increase almost 12 times.
What is my wrong? Is it necessary to replace my methodology in use of boost shared memory?
(I checked both maps and their result In second process and results was same in both of them.)

#include <fstream>
#include <iostream>
#include <exception>
#include <msgpack.hpp>
#include <boost/variant.hpp>
#include <boost/filesystem.hpp>
#include <boost/interprocess/containers/map.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>

using namespace std::literals;
namespace fs = boost::filesystem;
namespace bip = boost::interprocess;

enum class TYPE_MSG : int
{
    NULLPTR_,
    INT64_,
    DOUBLE_,
    STRING_,
    VECTOR_,
    MAP_,
};

auto sharedMemoryName = "MySharedMemory"s;
unsigned long long shmSize = 9.8 * 1024 * 1024 * 1024ull;
bip::managed_shared_memory segment(bip::open_or_create, sharedMemoryName.data(), shmSize);

template <typename T>
using Alloc = bip::allocator<T, bip::managed_shared_memory::segment_manager>;
const Alloc<void> allocator(segment.get_segment_manager());

class MOVarBip;
using STR = bip::basic_string<char, std::char_traits<char>, Alloc<char>>;
using PAIR = std::pair<const STR, MOVarBip>;
using MAP = bip::map<STR, MOVarBip, std::less<STR>, Alloc<PAIR>>;
using Vec = bip::vector<MOVarBip, Alloc<MOVarBip>>;


typedef boost::variant<std::nullptr_t, int64_t, double, STR, Vec, MAP> MOVarSTBIP;
class MOVarBip : public MOVarSTBIP
{
public:
    MOVarBip() : MOVarSTBIP(nullptr) {}
    MOVarBip(int64_t &b) { MOVarSTBIP::operator=(std::move(b)); }
    MOVarBip(double &b) { MOVarSTBIP::operator=(std::move(b)); }
    MOVarBip(STR &b) { MOVarSTBIP::operator=(std::move(b)); }
    MOVarBip(Vec &b) { MOVarSTBIP::operator=(std::move(b)); }
    MOVarBip(MAP &b) { MOVarSTBIP::operator=(std::move(b)); }

    const MOVarBip& operator=(int64_t&& b) { MOVarSTBIP::operator=(std::move(b)); return *this; }
    const MOVarBip& operator=(double&& b) { MOVarSTBIP::operator=(std::move(b)); return *this; }

    const MOVarBip& operator=(std::string&& b)
    {
        auto &tmpValue = *segment.construct<STR>(bip::anonymous_instance)(allocator);
        tmpValue = b.data();
        MOVarSTBIP::operator=(std::move(tmpValue));
        return *this;
    }

    const MOVarBip& operator=(std::vector<MOVar>&& value)
    {
        auto &vecBip = *segment.construct<Vec>(bip::anonymous_instance)(allocator);
        for (auto &item : value)
        {
            switch (item.which())
            {
            case static_cast<int>(TYPE_MSG::MAP_):
            {
                auto &mapBip = *segment.construct<MAP>(bip::anonymous_instance)(allocator);
                auto element = item._as_map().begin();
                auto mapEnd = item._as_map().end();
                for (; element != mapEnd; ++element)
                {
                    Convertor(mapBip, element);
                }
                MOVarBip valueBip = mapBip;
                vecBip.push_back(std::move(valueBip));
                break;
            }
            case static_cast<int>(TYPE_MSG::STRING_):
            {
                auto &tmpValue = *segment.construct<STR>(bip::anonymous_instance)(allocator);
                tmpValue = item._as_string().data();
                MOVarBip valueBip = tmpValue;
                vecBip.push_back(std::move(valueBip));
                break;
            }
            default:
            {
                throw std::logic_error("The code doesn't support this scenario for Vec type!");
            }
            }
        }

        MOVarSTBIP::operator=(std::move(vecBip));
        return *this;
    }

    const MOVarBip& operator=(std::map<std::string, MOVar>&& value)
    {
        auto &mapBip = *segment.construct<MAP>(bip::anonymous_instance)(allocator);
        auto itr = value.cbegin();
        auto endPoint = value.cend();
        for (; itr != endPoint; ++itr)
        {
            Convertor(mapBip, itr);
        }

        MOVarSTBIP::operator=(std::move(mapBip));
        return *this;
    }

    bool is_map() const { return which() == (int)TYPE_MSG::MAP_; }
    bool is_int64() const { return which() == (int)TYPE_MSG::INT64_; }
    bool is_nill() const { return which() == (int)TYPE_MSG::NULLPTR_; }
    bool is_double() const { return which() == (int)TYPE_MSG::DOUBLE_; }
    bool is_string() const { return which() == (int)TYPE_MSG::STRING_; }
    bool is_vector() const { return which() == (int)TYPE_MSG::VECTOR_; }

    const double &_as_double() const { return boost::get<double>(*this); }
    const int64_t &_as_int64() const { return boost::get<int64_t>(*this); }
    const STR &_as_string() const { return boost::get<STR>(*this); }
    const Vec &_as_vector() const { return boost::get<Vec>(*this); }
    const MAP &_as_map() const { return boost::get<MAP>(*this); }

private:
};


namespace msgpack
{
    MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)
    {
        namespace adaptor
        {
            template <>
            struct convert<STR>
            {
                msgpack::object const &operator()(msgpack::object const &o, STR &v) const
                {
                    switch (o.type)
                    {
                    case msgpack::type::BIN:
                        v.assign(o.via.bin.ptr, o.via.bin.size);
                        break;
                    case msgpack::type::STR:
                        v.assign(o.via.str.ptr, o.via.str.size);
                        break;
                    default:
                        throw msgpack::type_error();
                        break;
                    }
                    return o;
                }
            };

            template <>
            struct convert<MOVarBip>
            {
                msgpack::object const &operator()(msgpack::object const &o, MOVarBip &v) const
                {
                    switch (o.type)
                    {
                    case msgpack::type::NIL:
                        v = MOVarBip();
                        break;
                    case msgpack::type::BOOLEAN:
                        v = (int64_t)(o.as<bool>());
                        break;
                    case msgpack::type::POSITIVE_INTEGER:
                    {
                        uint64_t temp = o.as<uint64_t>();
                        if (temp > (uint64_t)0x7FFFFFFFFFFFFFFF)
                        {
                            v = std::to_string(temp);
                        }
                        else
                        {
                            v = ((int64_t)temp);
                        }
                        break;
                    }
                    case msgpack::type::NEGATIVE_INTEGER:
                        v = (o.as<int64_t>());
                        break;
                    case msgpack::type::FLOAT32:
                        v = ((double)o.as<float>());
                        break;
                    case msgpack::type::FLOAT64:
                        v = (o.as<double>());
                        break;
                    case msgpack::type::STR:
                        v = o.as<std::string>();
                        break;
                    case msgpack::type::BIN:
                        v = o.as<std::string>();
                        break;
                    case msgpack::type::ARRAY:
                        v = o.as<std::vector<MOVar>>();
                        break;
                    case msgpack::type::MAP:
                        v = o.as<std::map<std::string, MOVar>>();
                        break;
                    case msgpack::type::EXT:
                        throw msgpack::type_error();
                        break;
                    }
                    return o;
                }
            };

            template <>
            struct convert<MAP>
            {
                msgpack::object const &operator()(msgpack::object const &o, MAP &v) const
                {
                    if (o.type != msgpack::type::MAP)
                    {
                        throw msgpack::type_error();
                    }
                    msgpack::object_kv *p(o.via.map.ptr);
                    msgpack::object_kv *const pend(o.via.map.ptr + o.via.map.size);
                    auto &tmp = *segment.construct<MAP>(bip::anonymous_instance)(allocator);
                    for (; p != pend; ++p)
                    {
                        auto &key = *segment.construct<STR>(bip::anonymous_instance)(allocator);
                        p->key.convert(key);
                        p->val.convert(tmp[std::move(key)]);
                    }
                    v = std::move(tmp);
                    return o;
                }
            };
        }
    }
}


int main()
{
    auto fileName = "big_map.msgpack"s;
    startTime = std::chrono::high_resolution_clock::now();
    {
        std::ifstream file(fileName, std::ios::binary);
        auto fileSize = fs::file_size(fileName);
        std::vector<char> buffer(fileSize);
        file.read(buffer.data(), fileSize);

        auto &bip_map = *segment.construct<MAP>("bip_map")(allocator);
        msgpack::object_handle oh = msgpack::unpack(buffer.data(), fileSize);
        msgpack::object deserialized = oh.get();
        deserialized.convert(bip_map);
    }
    endTime = std::chrono::high_resolution_clock::now();
    duration = std::chrono::duration_cast<std::chrono::seconds>(endTime - startTime);
    std::cout << "Duration: " << duration.count() << " seconds" << std::endl;
    boost::interprocess::shared_memory_object::remove(sharedMemoryName.data());
}


This is the output of the code:

Duration: 72 seconds (for std::map)

Duration: 956 seconds (for bip::map)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật