Menu

#2 ErrorCache hash  Edit

closed
nobody
None
5
2012-07-04
2008-12-17
No

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.

Discussion

  • Greg Beauchesne

    Greg Beauchesne - 2008-12-17

    Patch for soprano/error.cpp

     
  • Sebastian Trueg

    Sebastian Trueg - 2009-01-26

    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.

     

Anonymous
Anonymous

Add attachments
Cancel