opencog / atomspace

The OpenCog (hyper-)graph database and graph rewriting system
https://wiki.opencog.org/w/AtomSpace
Other
817 stars 229 forks source link

sparse query pattern performance #2973

Open linas opened 2 years ago

linas commented 2 years ago

The sparse queries are used for the cheminformatics git repo. They consist of an unordered link holding the query pattern, and a glob to soak up everything else. As currently implemented in pull reqs #2968 #2970 #2971 the algo does an exhaustive search ... which is not required. For truly sparse data, the performance can be tremendously improved by compiling all of the connected components in the pattern, and then traversing only those.

This could be done by taking the current connected-component code, and refactoring it so it can also be employed here.

This work could become urgent, if the cheminformatics project takes off. The current code could be a major performance bottleneck.