Serialization creates huge object file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Serialization creates huge object file

Zoltan Szatmary
Dear Robert,

I have been using the serialization lib for a while. I already wrote
some mail to this list as you might remember. I was quite satisfied with
its performance and ease of use, but now there is a problem I cannot
solve. I need to serialize/deserialize some 50 polymorphic classes, so I
do BOOST_CLASS_EXPORT them. I put all the serialization related logic
into one definition (.cpp) file. I only use two types of archives,
xml_iarchive and xml_oarchive. Now, when I compile the file with Intel
compiler v8.2 on an Itanium based machine and with debug info the result
is a huge (>42MB) object file, which ld (the linker) simply refuses to
link. I am quite sure that the size of the object file is the problem. I
tried to separate the xml_iarchive related code to one .cpp file and the
xml_oarchive related code to an another, but of course this means that
export.hpp is included to both, which results in multiple definitions
error when trying to link the two object files together. Could you
suggest any solution?

Thank you very much in advance

Zoltan Szatmary

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Serialization creates huge object file

Zoltan Szatmary
Dear Robert,

please disregard my previous post. I solved the problem.

Sorry for the disturbance

Z

Zoltan Szatmary wrote:

> Dear Robert,
>
> I have been using the serialization lib for a while. I already wrote
> some mail to this list as you might remember. I was quite satisfied
> with its performance and ease of use, but now there is a problem I
> cannot solve. I need to serialize/deserialize some 50 polymorphic
> classes, so I do BOOST_CLASS_EXPORT them. I put all the serialization
> related logic into one definition (.cpp) file. I only use two types of
> archives, xml_iarchive and xml_oarchive. Now, when I compile the file
> with Intel compiler v8.2 on an Itanium based machine and with debug
> info the result is a huge (>42MB) object file, which ld (the linker)
> simply refuses to link. I am quite sure that the size of the object
> file is the problem. I tried to separate the xml_iarchive related code
> to one .cpp file and the xml_oarchive related code to an another, but
> of course this means that export.hpp is included to both, which
> results in multiple definitions error when trying to link the two
> object files together. Could you suggest any solution?
>
> Thank you very much in advance
>
> Zoltan Szatmary
>
>

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Serialization creates huge object file

Oliver Mutz
Zoltan Szatmary wrote:
> Dear Robert,
>
> please disregard my previous post. I solved the problem.

Dear Zoltan,

Can you tell me how you solved the problem, because I'm facing the same
issue. In fact, I can still link (with VC2005) but my obj-file is already
37MB and there are still some classes to come And the compiler eats up about
1,8GB during compile.
At the moment I'm thinking of converting my serialization prozess to
polymorphic archives what would result in a lot of code rewriting.
Maybe you found a somehow smarter solution.

Thanks in advance

Oliver Mutz

>
> Sorry for the disturbance
>
> Z
>
> Zoltan Szatmary wrote:
>
>> Dear Robert,
>>
>> I have been using the serialization lib for a while. I already wrote
>> some mail to this list as you might remember. I was quite satisfied
>> with its performance and ease of use, but now there is a problem I
>> cannot solve. I need to serialize/deserialize some 50 polymorphic
>> classes, so I do BOOST_CLASS_EXPORT them. I put all the serialization
>> related logic into one definition (.cpp) file. I only use two types
>> of archives, xml_iarchive and xml_oarchive. Now, when I compile the
>> file with Intel compiler v8.2 on an Itanium based machine and with
>> debug info the result is a huge (>42MB) object file, which ld (the
>> linker) simply refuses to link. I am quite sure that the size of the
>> object file is the problem. I tried to separate the xml_iarchive
>> related code to one .cpp file and the xml_oarchive related code to
>> an another, but of course this means that export.hpp is included to
>> both, which results in multiple definitions error when trying to
>> link the two object files together. Could you suggest any solution?
>>
>> Thank you very much in advance
>>
>> Zoltan Szatmary
>>
>>
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users 





_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Serialization creates huge object file

Robert Ramey
In reply to this post by Zoltan Szatmary
have you tried building in release mode?  Of if you must run in
debug mode - exclude the debug symbols - or ?  I don't see
this is something that can be addressed from the serialization
system - what does intel say?

Robert Ramey


Zoltan Szatmary wrote:

> Dear Robert,
>
> I have been using the serialization lib for a while. I already wrote
> some mail to this list as you might remember. I was quite satisfied
> with its performance and ease of use, but now there is a problem I
> cannot solve. I need to serialize/deserialize some 50 polymorphic
> classes, so I do BOOST_CLASS_EXPORT them. I put all the serialization
> related logic into one definition (.cpp) file. I only use two types
> of archives, xml_iarchive and xml_oarchive. Now, when I compile the
> file with Intel compiler v8.2 on an Itanium based machine and with
> debug info the result is a huge (>42MB) object file, which ld (the
> linker) simply refuses to link. I am quite sure that the size of the
> object file is the problem. I tried to separate the xml_iarchive
> related code to one .cpp file and the xml_oarchive related code to an
> another, but of course this means that export.hpp is included to
> both, which results in multiple definitions error when trying to link
> the two object files together. Could you suggest any solution?
>
> Thank you very much in advance
>
> Zoltan Szatmary



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users