Soprano::Error::ErrorCache creates a new errorMap hash the first time an error code is set or cleared. This might be OK for some classes, but for classes such as Soprano::Iterator, which can get created and destroyed frequently, this can cause some overhead even though no errors are raised in the majority of cases.
To that end, I have attached a patch against Soprano 2.1.1 for soprano/error.cpp which makes sure that the error hash is not created unless an error is actually set.
Anonymous
Patch for soprano/error.cpp
Thanks a lot for the patch. It makes perfect sense and has just been applied to svn trunk. Will be part of Soprano 2.2.