|
Boost Users : |
Subject: Re: [Boost-users] slow exception handling
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-12-11 20:19:06
On Wed, Dec 11, 2013 at 7:14 PM, XIN LI <lixinusa2013_at_[hidden]> wrote:
> The exceptions happens thousands of times within those 5 minutes. I just
> wondering why boost exception code can impact normal c++ exception
> performance?
I'm not sure Boost exceptions, or C++ exceptions in general, are
necessarily well understood by this question. That's where I would
begin. Read up on C++ exceptions; you can throw an int, or a char, for
instance, if you wanted to. However, most of the time, you are
throwing an instance of a class, which can have all sorts of logic to
tell about itself when it is caught, which all takes time to process.
> On Wed, Dec 11, 2013 at 5:09 PM, Emil Dotchevski <emildotchevski_at_[hidden]>
> wrote:
>>
>> On Wed, Dec 11, 2013 at 4:58 PM, XIN LI <lixinusa2013_at_[hidden]> wrote:
>> > In my code, I add some protection to catch the exception from boost like
>> > "catch (boost::archive::archive_exception& ex)", strangely, it slow
>> > exception handling, causing one of our tests to go from around 30 seconds
>> > to greater than 5 minutes.
>>
>> How many exceptions do you throw and catch within those 5 minutes?
>> Throwing exceptions isn't exactly fast.
>>
>> --
>> Emil Dotchevski
>> Reverge Studios, Inc.
>> http://www.revergestudios.com/reblog/index.php?n=ReCode
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net