opencog / atomspace

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

boost::signals2 performance #1078

Closed linas closed 6 years ago

linas commented 7 years ago

Turns out that boost::signals2 is hugely bloated (google it, or take a look in gdb), and accounts for 5% or 10% of the atomspace performance even when they're not attached .(comment out the two signals, and measure perf with atomspace_bm tool).

A very small, simple signals class is in https://github.com/opencog/cogutils/blob/master/opencog/util/sigslot.h -- it should be enough for all usages inside of opencog. It just needs to be wired in.

linas commented 7 years ago

boost::signals2 is used in:

attention/AttentionModule.h
cogserver/modules/events/AtomSpacePublisherModule.h
cogserver/server/SystemActivityTable.h
learning/dimensionalembedding/DimEmbedModule.h
spacetime/TimeServer.h
linas commented 6 years ago

Done in #1504 and other pull reqs in the opencog repo.