You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2006/12/04 18:47:34 UTC

svn commit: r482262 - in /incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr: APRBase.cpp APRBase.h

Author: gsim
Date: Mon Dec  4 09:47:33 2006
New Revision: 482262

URL: http://svn.apache.org/viewvc?view=rev&rev=482262
Log:
Patch from Andrew Stitcher:

This patch improves the performance of my test by about 20%

It removes a lot of unnecessary string creation, as ...::check(...) is called for every CHECK_APR_SUCCESS(), and they are very frequent.


Modified:
    incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.cpp
    incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.h

Modified: incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.cpp?view=diff&rev=482262&r1=482261&r2=482262
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.cpp Mon Dec  4 09:47:33 2006
@@ -82,7 +82,7 @@
     getInstance()->_decrement();
 }
 
-void qpid::sys::check(apr_status_t status, const std::string& file, const int line){
+void qpid::sys::check(apr_status_t status, const char* file, const int line){
     if (status != APR_SUCCESS){
         const int size = 50;
         char tmp[size];

Modified: incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.h?view=diff&rev=482262&r1=482261&r2=482262
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.h (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/sys/apr/APRBase.h Mon Dec  4 09:47:33 2006
@@ -52,7 +52,7 @@
     };
 
     //this is also a convenient place for a helper function for error checking:
-    void check(apr_status_t status, const std::string& file, const int line);
+    void check(apr_status_t status, const char* file, const int line);
     std::string get_desc(apr_status_t status);
 
 #define CHECK_APR_SUCCESS(A) qpid::sys::check(A, __FILE__, __LINE__);