You can check with Kim but I think you need to modify something under
qpid/gentools/templ.cpp/
On Fri, 2006-12-15 at 14:39 +0000, Andrew Stitcher wrote:
> One more modest performance speed up (around 1.5%); unfortunately this
> is in code generated by the java generator so I don't really know where
> to start to fix this:
>
> In the generated file:
>
> BasicDeliverBody.h
>
> The constructor for BasicDeliverBody uses string by value where it
> should use it by constant reference,
>
> I'm not sure if there any other implications of this change, but it's
> worth doing here, and any other code just initialising string can do it
> through a const reference to avoid an unnecessary copy.
>
> [Incidentally I was surprised to see a bare "string" in a header file,
> the name space must be polluted somewhere]
>
> Andrew
>
> viz:
> > class BasicDeliverBody : virtual public AMQMethodBody
> > {
> > ...
> > BasicDeliverBody(ProtocolVersion version,
> > string consumerTag,
> > u_int64_t deliveryTag,
> > bool redelivered,
> > string exchange,
> > string routingKey
> > ) :
> > AMQMethodBody(version),
> > consumerTag(consumerTag),
> > deliveryTag(deliveryTag),
> > redelivered(redelivered),
> > exchange(exchange),
> > routingKey(routingKey)
> > { }
> > ...
> > }
>
> should be:
>
> class BasicDeliverBody : virtual public AMQMethodBody
> {
> ...
> BasicDeliverBody(ProtocolVersion version,
> const string& consumerTag,
> u_int64_t deliveryTag,
> bool redelivered,
> const string& exchange,
> const string& routingKey
> ) :
> AMQMethodBody(version),
> consumerTag(consumerTag),
> deliveryTag(deliveryTag),
> redelivered(redelivered),
> exchange(exchange),
> routingKey(routingKey)
> { }
> ...
> }
>
>