graphology: Value undefined out of range for undefined options property undefined
Hey guys. I have 1,000,002 nodes and 16,777,216 edges. I have to try add a new edge but i have an error like this:
RangeError: Value undefined out of range for undefined options property undefined
Thanks for your help.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 27 (10 by maintainers)
Hello everyone,
I wanted to let you know that I just published a new package
large-set: https://github.com/aldipermanaetikaputra/large-set. It can handle a much larger number of elements than the default limit of $2^{24}$ or $16.777.216$, without sacrificing performance as much as possible. Feel free to give it a try!In which case it would also not be absurd to reimplement using low-level structures such as byte arrays this logic here: https://github.com/graphology/graphology/blob/master/src/shortest-path/dijkstra.js#L57-L164 to work with your data. But I don’t know the time you have etc. and what kind of scale you want to reach etc. (maybe node.js is not a good fit and using C or rust is a better idea also). Most of the heavy work in the function is actually done by
mnemonistheaps.At one point I might add some kind of trick into the lib to make sure we can have more than 2^24 items in either nodes or edges but this won’t happen shortly. The shortest way really is to try and override default Map with @Inrixia trick shown here: https://github.com/nodejs/node/issues/37320 Out of curiosity what kind of shortest path are you trying to extract here? single source to each other? a single path?