mage icon indicating copy to clipboard operation
mage copied to clipboard

Execution time of pagerank_online.get() increases significantly by just adding edges

Open gitbuda opened this issue 4 years ago • 1 comments

From Memgraph Lab start import of the Marvel dataset with the following initial setup

CREATE TRIGGER pagerank_online BEFORE COMMIT EXECUTE CALL pagerank_online.update(createdVertices, createdEdges, deletedVertices, deletedEdges) YIELD *;
CALL pagerank_online.set(100, 0.2) YIELD *;

execution time of CALL pagerank_online.get() seems to go up linearly while it should be constant because of the fixed number of nodes. Maybe that's because the get() is called while the edges are still being imported, but still is should behave without time increase.

gitbuda avatar Nov 08 '21 09:11 gitbuda

Thank you for reporting this issue! I took some time to explore the bottleneck in computation, and it appears that collecting a graph from Memgraph to an intermediate representation takes around 95% of the query module calling time. The team should definitely expand on this issue and figure out what should be done in order to reduce that time.

This issue is not a problem for static computing since there is no reason to update it frequently, but calling it frequently means linearly slowing the algorithm with each run!

jmatak avatar Nov 08 '21 12:11 jmatak