Hi Marc,

Thanks for your reply. I am new to this JBoss group as well as using
JBoss. I couldn't understand your reply completely. I would greatly
appreciate it if you could ellaborate on your response.

> I remember Rickard telling me about a little flag one would set to > instruct the VM 
>to reuse the objects (Map message) in your case.

1. Where is the flag that you were mentioning? Is there any document
regarding this? 

2. Regarding reusing the object - In my code, the message is created
only ONCE in an init() method, using this - 
        msg = tsession.createMapMessage();
where tsession is a TopicSession.

After that, there is a while loops that uses this message, changes the
fields everytime and sends it to the Topic. Something like this:

    public void run()
    {
        while (loop-- > 0)
        {
            try
            {
                long start = System.currentTimeMillis();
                String id = tag + "," + counter++;
                String caller = "1234";
                String callee = "5678";
                
                // Compose the message
                msg.setLong("start", start);
                msg.setString("id", id);
                msg.setString("caller", caller);
                msg.setString("callee", callee);
    
                // send the message
                tpublisher.publish(msg);
    
                long end = System.currentTimeMillis();
                System.out.println(start + "," + id + "," + end);
            }
            catch(JMSException jmse)
            {
                jmse.printStackTrace();
            }
        }
    }

I fail to see why this should take so much time.


> Please add this in the features of JBossMQ and crosspost there.

Do you mean that I should ask the same question on the JBossMQ group or
is there some place where I should add this as a feature? 

Thanks,

Vipul.

----------- original message --------------

From: "marc fleury" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: [JBoss-user] JMS performance.
Date: Thu, 14 Jun 2001 11:37:53 -0400
Reply-To: [EMAIL PROTECTED]

|I noticed that on an average, it takes around 3.7 milliseconds to
|compose this message on the Weblogic Server whereas it takes 200
|milliseconds to compose this same message on the JBoss Server.

Anytime there is "orders" of magnitude in creating object it usually
means
that there is serious serialization involved and the simplest way is to
reuse the object and minimize the serialization going on inside.  I
remember
Rickard telling me about a little flag one would set to instruct the VM
to
reuse the objects (Map message) in your case.

Please add this in the features of JBossMQ and crosspost there.  We
really
need to take JBossMQ performance very seriously and the first step
(since
you all seem to be benching in loops) is to take care of the times it
takes
to create any JMS Message type objects in the VM by pre-creating a few
and/or making sure they are reused by the VM.

regards

marcf

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to