Description
Hello again. My coworkers and I have observed a massive increase in compile times ever since we have implemented your library into our project. To make the project compile, we've had to add the following compiler flag: clang:-fconstexpr-depth=2048
, which strongly implies there is a heavy amount of recursion at play.
As it stands, we are currently only reflecting two structs. One of them looks as follows:
struct Character
{
std::optional<bson_oid_t> _id;
std::string accountId;
std::string characterName;
int money = 0;
int rank = 0;
int64 affiliation = 0;
std::optional<std::string> repGroup;
std::optional<Vector> pos;
std::optional<Vector> rot;
std::string voice;
int interfaceState = 0;
float hullStatus = 1.f;
float baseHullStatus = 1.f;
bool canDock = true;
bool canTradeLane = true;
int64 lastDockedBase = 0;
int64 currentBase = 0;
int64 currentRoom = 0;
int killCount = 0;
int missionFailureCount = 0;
int missionSuccessCount = 0;
int64 shipHash = 0;
int64 system = 0;
int64 totalTimePlayed = 0;
Costume baseCostume;
Costume commCostume;
std::vector<FLCargo> cargo;
std::vector<FLCargo> baseCargo;
std::vector<Equipment> equipment;
std::vector<Equipment> baseEquipment;
std::unordered_map<int, float> collisionGroups;
std::unordered_map<int, float> baseCollisionGroups;
//keys are actually unsigned ints, but this works anyway
std::unordered_map<int, float> reputation;
std::unordered_map<int, int> shipTypesKilled;
std::unordered_map<int, int> randomMissionsCompleted;
std::unordered_map<int, int> randomMissionsAborted;
std::unordered_map<int, int> randomMissionsFailed;
std::unordered_map<int, char> visits;
std::vector<int64> systemsVisited;
std::vector<int64> basesVisited;
std::vector<NpcVisit> npcVisits;
std::vector<int64> jumpHolesVisited;
std::unordered_map<int, std::vector<std::string>> weaponGroups;
};
We have no plans to introduce structs larger than this one, but the very notable increase in compile time (from about 30-40 seconds to around 5:30 minutes) completely cripples our ability for rapid iteration, slowing down development of several critical features to a standstill.
Thanks again for the great work, and I know it's not an easy thing to diagnose, but we'd greatly appreciate any support in getting those compile times to a more manageable level.
Activity