introspection major optimization

This commit is contained in:
2022-04-15 01:31:22 +03:00
parent 6abec38856
commit 4b32101de6
7 changed files with 145 additions and 103 deletions

View File

@@ -20,7 +20,7 @@
#ifndef PIINTROSPECTION_CONTAINERS_P_H
#define PIINTROSPECTION_CONTAINERS_P_H
#include "pimutex.h"
#include "pispinlock.h"
#include <map>
#include <string>
#include "picrc.h"
@@ -32,14 +32,12 @@ public:
struct TypeInfo;
void containerNew (const char * tn, uint isz);
void containerDelete(const char * tn);
void containerAlloc (const char * tn, ullong cnt);
void containerFree (const char * tn, ullong cnt);
void containerUsed (const char * tn, ullong cnt);
void containerUnused(const char * tn, ullong cnt);
uint typeID(const char * tn);
void containerNew (const PIIntrospectionContainersType & ti, uint isz);
void containerDelete(const PIIntrospectionContainersType & ti);
void containerAlloc (const PIIntrospectionContainersType & ti, ullong cnt);
void containerFree (const PIIntrospectionContainersType & ti, ullong cnt);
void containerUsed (const PIIntrospectionContainersType & ti, ullong cnt);
void containerUnused(const PIIntrospectionContainersType & ti, ullong cnt);
PIVector<TypeInfo> getInfo() const;
@@ -63,8 +61,8 @@ public:
};
std::map<uint, _Type> data;
std::map<uint, std::string> typenames;
mutable PIMutex mutex;
std::map<uint, PIIntrospectionContainersType> types;
mutable PISpinlock mutex;
};
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PIIntrospectionContainers::TypeInfo & v);