mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
perf(primproc) MCOL-5601: Initilize two fields once in ctor instead of calling makeConfig
std::string fTmpDir = config::Config::makeConfig()->getTempFileDir(config::Config::TempDirPurpose::Aggregates); std::string fCompStr = config::Config::makeConfig()->getConfig("RowAggregation", "Compression");
This commit is contained in:
parent
9d5ad925eb
commit
4d7a6a0be5
@ -675,19 +675,16 @@ void RowAggregation::initialize(bool hasGroupConcat)
|
||||
}
|
||||
}
|
||||
|
||||
config::Config* config = config::Config::makeConfig();
|
||||
string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
||||
string compStr = config->getConfig("RowAggregation", "Compression");
|
||||
auto* compressor = compress::getCompressInterfaceByName(compStr);
|
||||
auto* compressor = compress::getCompressInterfaceByName(fCompStr);
|
||||
|
||||
if (fKeyOnHeap)
|
||||
{
|
||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
||||
}
|
||||
else
|
||||
{
|
||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||
disk_agg, allow_gen, compressor));
|
||||
}
|
||||
|
||||
@ -768,19 +765,16 @@ void RowAggregation::aggReset()
|
||||
}
|
||||
}
|
||||
|
||||
config::Config* config = config::Config::makeConfig();
|
||||
string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
||||
string compStr = config->getConfig("RowAggregation", "Compression");
|
||||
auto* compressor = compress::getCompressInterfaceByName(compStr);
|
||||
auto* compressor = compress::getCompressInterfaceByName(fCompStr);
|
||||
|
||||
if (fKeyOnHeap)
|
||||
{
|
||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
||||
}
|
||||
else
|
||||
{
|
||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||
disk_agg, allow_gen, compressor));
|
||||
}
|
||||
fRowGroupOut->getRow(0, &fRow);
|
||||
|
@ -635,6 +635,10 @@ class RowAggregation : public messageqcpp::Serializeable
|
||||
boost::shared_ptr<int64_t> fSessionMemLimit;
|
||||
std::unique_ptr<RGData> fCurRGData;
|
||||
bool fRollupFlag = false;
|
||||
|
||||
std::string fTmpDir = config::Config::makeConfig()->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
||||
std::string fCompStr = config::Config::makeConfig()->getConfig("RowAggregation", "Compression");
|
||||
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user