-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[generator] Process locality object on memory for interval index building #70
Conversation
859fbe8
to
db000c6
Compare
covering::LocalitiesCovering localitiesCovering; | ||
while (!coveringsParts.empty()) | ||
{ | ||
auto & part = coveringsParts.back(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
indexer/locality_index_builder.hpp
Outdated
} | ||
|
||
FileReader reader(cellsToValueFile); | ||
DDVector<CellValuePair<uint64_t>, FileReader, uint64_t> cellsToValue(reader); | ||
bool BuildLocalityIndex(std::string const & localityIndexPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Параметер covering должен быть первым.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
indexer/locality_index_builder.hpp
Outdated
} | ||
|
||
FileReader reader(cellsToValueFile); | ||
DDVector<CellValuePair<uint64_t>, FileReader, uint64_t> cellsToValue(reader); | ||
bool BuildLocalityIndex(std::string const & localityIndexPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возможно стоит переименовать функцию во что-то вроде BuildCoveringIndex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
indexer/locality_index_builder.hpp
Outdated
covering::GetCodingDepth<BuildingSpec::kDepthLevels>(scales::GetUpperScale()); | ||
|
||
auto const id = localityObject.GetStoredId(); | ||
auto && cells = m_buildingSpec.Cover(localityObject, cellDepth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю переименовать m_buildingSpec в m_BuilderSpec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
indexer/locality_index_builder.hpp
Outdated
BuildingSpec m_buildingSpec; | ||
}; | ||
|
||
struct RegionsLocalityIndexBuildingSpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegionsLocalityIndexBuildingSpec -> RegionsIndexBuildingSpec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
indexer/locality_index_builder.hpp
Outdated
} | ||
}; | ||
|
||
struct GeoObjectsLocalityIndexBuidingSpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeoObjectsLocalityIndexBuidingSpec -> GeoObjectsIndexBuidingSpec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
db000c6
to
1fd232e
Compare
} | ||
}; | ||
|
||
using RegionsLocalityIndexBuilder = LocalityIndexBuilder<RegionsIndexBuilderSpec>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegionsLocalityIndexBuilder > RegionsIndexBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сделаю отд. pr
}; | ||
|
||
using RegionsLocalityIndexBuilder = LocalityIndexBuilder<RegionsIndexBuilderSpec>; | ||
using GeoObjectsLocalityIndexBuilder = LocalityIndexBuilder<GeoObjectsIndexBuilderSpec>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeoObjectsLocalityIndexBuilder -> GeoObjectsIndexBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сделаю отд. pr
Ускорение построения обратных индексов для regions и geo_objects. Обработка геометрии объектов происходит в памяти, а не через промежуточный файл. В пиках, для geo_objects, потребление памяти достигает 140Gb.
Ускорение построения
geo_objects_index.locidx
в ~12 раз (42m vs 8h)