Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-05-29 23:44:48


  "Andrew VanUitert" <avanuitert_at_[hidden]> wrote in message news:968E4E7B19473048BED7EFA2CE02C0990724BDD9_at_c4mail.control4.com...
   

  I am using Boost Serialization as a basic RPC mechanism on an embedded Linux system, however it seems that the serialization library uses a lot of CPU cycles to process some rather simple messages. Each of the messages I am using passes a pointer to an object that is a serializable object representing the needed parameters for each type of message. As each message/command is passed from one system to another, the pointer is filled in with the de-marshaled parameters. So far this has worked splendidly except for the CPU utilization. The embedded processor is an Arm running at 300 MHz, and when I send it repeated messages the CPU utilization pegs. Profiling has revealed that the embedded processor is spending all its time in serialization library.

   

  For the most part, the message being sent back and forth are arrays of chars under 255 in size.

   

  Are there some general guidelines when considering performance with this library ?

   

  For instance, I read that the performance of 1.34 increased substantially with the use of a streambuf and a binary archive for arrays of basic types. However, the constructor that takes a streambuf is only available in the binary archive, and I am using a text archive to avoid ending and alignment issues.

   

  Is the use of a pointer for the parameters a place for optimization ?

  *** usage of pointers would be ALOT slower than just passing the structure.

  ***

  a) change to void passing structures

  b) upgrade to boost 1.34

  c) if the machines are compatible - try to use binary archives

  you'll see a huge increase in performance

  Robert Ramey

   

  Andy

------------------------------------------------------------------------------

  _______________________________________________
  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