Skip to content

Commit

Permalink
in-mem graph loading: skip reading neighbor list when out edge count …
Browse files Browse the repository at this point in the history
…is 0
  • Loading branch information
ltan1ms committed Feb 16, 2024
1 parent dbd702b commit 8e4d10d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/in_mem_graph_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ std::tuple<uint32_t, uint32_t, size_t> InMemGraphStore::load_impl(AlignedFileRea
graph_offset += sizeof(uint32_t);
std::vector<uint32_t> tmp(k);
tmp.reserve(k);
read_array(reader, tmp.data(), k, graph_offset);
graph_offset += k * sizeof(uint32_t);
cc += k;
if (k > 0)
{
read_array(reader, tmp.data(), k, graph_offset);
graph_offset += k * sizeof(uint32_t);
cc += k;
}
_graph[nodes_read].swap(tmp);
nodes_read++;
if (nodes_read % 1000000 == 0)
Expand Down

0 comments on commit 8e4d10d

Please sign in to comment.