Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] baffled by very long archive loadtime
From: Martin Weinberg (weinberg_at_[hidden])
Date: 2010-03-29 21:29:40


On Mon, Mar 29, 2010 at 12:58:38PM -0800, Robert Ramey wrote:
> Martin Weinberg wrote:
> > On Mon, Mar 29, 2010 at 11:09:42AM -0800, Robert Ramey wrote:
> >> >I have noticed that I need to compile with "-Ox
> >>> -fno-inline-small-functions" when x=2,3. I'm not sure if this is
> >>> significant.
> >>
> >> I would expect this to be extremely significant. why do you
> >> need to do this. I have used gcc profiling to investigate
> >> bottlenecks in the library. You might look at the directory
> >> ../libs/serialization/performance to see how to do this.
> >
> > Thanks to all who replied! I'll try compiling with profiling.
> > Meanwhile, in direct answer to the question above, if I compile
> > without suppressing inline-small-function optimization, I get these
> > errors:
>
> The most effective thing you could is to investigate the cause of these
> errors.
> prsumable they are due to the the new class you added.
> Also, polymorphic archives a measurable slower than the non-polymorphic
> versions. So if performance is important to you, then consider changing.
> I realize that this will result in more instanciated code, but the execution
> will be faster.
>
> Finally, you might consider moving to the most recent version of the
> library. It's much harder to help someone who's using an older package.

Thanks for the commments. Yes, I've tried to find the cause of the
optimization errors but without much success (which is why I posted
here). I've tried compiing "-g -finline-small-functions" but this
combination does not fail. Sigh. BTW, "-O1" level is fine as well
(as previously mentioned). If you have any specific suggestions on
the optimization issue, I'd be happy to try them.

I've also tried long valgrind runs but (excepting the usual system
library cruft) it is valgrind clean.

Regarding versions, I've tried Boost 1.37, 1.38 and 1.42 and all
exhibit the same behavior. I'm happy to stick to 1.42.

Regarding runtime, I understand, in principle, the overhead incurred
by dynamic binding. But the polymorphic approach is very convenient
(and clever) and I don't care about serialization performance within
reason (e.g. 10 sec or even 5 minutes) since it is not the runtime
bottleneck. But a 1 hour archive load for a 32MB archive makes no
sense to me.

No doubt that it is my own code that is at fault, but I'm not having
success on my own at diagnosing the boost::serialization-generated
clues.

My gprof run with boost and the application compiled "-g -pg" is still
going . . .

>
> >
> > cli:
> > /usr/local/boost_1_38_0/include/boost-1_38/boost/archive/impl/archive_pointer_oserializer.ipp:64:
> > static const boost::archive::detail::basic_pointer_oserializer*
> > boost::archive::detail::archive_pointer_oserializer<Archive>::find(const
> > boost::serialization::extended_type_info&) [with Archive =
> > boost::archive::polymorphic_oarchive]: Assertion `it !=
> > boost::serialization::singleton< oserializer_map<Archive>
> > >::get_const_instance().end()' failed. cli:
> > /usr/local/boost_1_38_0/include/boost-1_38/boost/archive/impl/archive_pointer_oserializer.ipp:64:
> > static const boost::archive::detail::basic_pointer_oserializer*
> > boost::archive::detail::archive_pointer_oserializer<Archive>::find(const
> > boost::serialization::extended_type_info&) [with Archive =
> > boost::archive::polymorphic_oarchive]: Assertion `it !=
> > boost::serialization::singleton< oserializer_map<Archive>
> > >::get_const_instance().end()' failed. cli:
> > /usr/local/boost_1_38_0/include/boost-1_38/boost/archive/impl/archive_pointer_oserializer.ipp:64:
> > static const boost::archive::detail::basic_pointer_oserializer*
> > boost::archive::detail::archive_pointer_oserializer<Archive>::find(const
> > boost::serialization::extended_type_info&) [with Archive =
> > boost::archive::polymorphic_oarchive]: Assertion `it !=
> > boost::serialization::singleton< oserializer_map<Archive>
> > >::get_const_instance().end()' failed. cli:
> > /usr/local/boost_1_38_0/include/boost-1_38/boost/archive/impl/archive_pointer_oserializer.ipp:64:
> > static const boost::archive::detail::basic_pointer_oserializer*
> > boost::archive::detail::archive_pointer_oserializer<Archive>::find(const
> > boost::serialization::extended_type_info&) [with Archive =
> > boost::archive::polymorphic_oarchive]: Assertion `it !=
> > boost::serialization::singleton< oserializer_map<Archive>
> > >::get_const_instance().end()' failed.
> >
> >
> >>
> >> _______________________________________________
> >> 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
>

-- 
Martin Weinberg                      Phone: (413) 545-3821
Dept. of Astronomy                   FAX:   (413) 545-4223
530 Graduate Research Tower	     weinberg_at_[hidden]
University of Massachusetts
Amherst, MA  01003-4525

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