Skip to content
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

Adding more vertices to a huge graph is very slow #136

Closed
luvicri opened this issue Sep 18, 2015 · 3 comments
Closed

Adding more vertices to a huge graph is very slow #136

luvicri opened this issue Sep 18, 2015 · 3 comments
Labels

Comments

@luvicri
Copy link

luvicri commented Sep 18, 2015

Hi there.
II have a big problem. I need to create a big graph, with more than 1800000 vertices. It takes more than 5 minutes to create just 20k nodes(simple nodes with a simple string attribute). So i realized that the problem is the creation of nodes. When the block of code where nodes are created starts, the system slows down. Anybody can help me to solve this issue?

@clue clue added the question label Oct 12, 2015
@clue
Copy link
Member

clue commented Oct 12, 2015

Thanks for your interesting question @luvicri!

It takes more than 5 minutes to create just 20k nodes

I consider this to be a defect which should be fixed :-)

You've already mailed me some details which indicate that this is related to how we allocate the next free vertex ID (which happens to be a naive O(n) implementation). We should keep an eye on this, but this will probably be resolved once we address #131.

Your mail also suggested the workaround to explicitly pass vertext IDs to Graph::createVertex() and I've verified this indeed resolves the performance issue here.

more than 1800000 vertices

There's certainly room for improvement in this library and I'm all for addressing any performance issues. However, I'm not sure supporting millions of objects should be our main focus here.

This is a PHP library after all, which stores all objects in memory. This also means that there's currently no way to store more objects than what your system (RAM) permits. If you're looking into storing multi gigabytes worth of objects, you might be better off using some full-fledged graph database.

I hope this helps.

@clue
Copy link
Member

clue commented Oct 12, 2015

You've already mailed me some details which indicate that this is related to how we allocate the next free vertex ID (which happens to be a naive O(n) implementation). We should keep an eye on this, but this will probably be resolved once we address #131.

I'll keep track of this in #131 and close this ticket for now.

@clue clue closed this as completed Oct 12, 2015
@luvicri
Copy link
Author

luvicri commented Oct 13, 2015

Yes, i switched on a graph db. But i would like to work with you to improve the library, because is really well done! I can’t work now on the library but maybe between a month…
The issues about performance are a trip for me! :)

Thank’s for you help!

Il giorno 12/ott/2015, alle ore 12:21, Christian Lück <notifications@github.com mailto:notifications@github.com> ha scritto:

Thanks for your interesting question @luvicri https://github.com/luvicri!

It takes more than 5 minutes to create just 20k nodes

I consider this to be a defect which should be fixed :-)

You've already mailed me some details which indicate that this related to how we allocate the next free vertex ID (which happens to be a naive O(n) implementation). We should keep an eye on this, but this will probably be resolved once we address #131 #131.

Your mail also suggested the workaround to explicitly pass vertext IDs to Graph::createVertex() and I've verified this indeed resolves the performance issue here.

more than 1800000 vertices

There's certainly room for improvement in this library and I'm all for addressing any performance issues. However, I'm not sure supporting millions of objects should be our main focus here.

This is a PHP library after all, which stores all objects in memory. This also means that there's currently no way to store more objects than what your system (RAM) permits. If you're looking into storing multi gigabytes worth of objects, you might be better off using some full-fledged graph database.

I hope this helps.


Reply to this email directly or view it on GitHub #136 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants