[jboss-jira] [JBoss JIRA] Commented: (JGRP-806) Message: investigate making the overhead for headers smaller

Michal Frajt (JIRA) jira-events at lists.jboss.org
Mon Jul 28 13:37:45 EDT 2008


    [ https://jira.jboss.org/jira/browse/JGRP-806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422801#action_12422801 ] 

Michal Frajt commented on JGRP-806:
-----------------------------------

Bela, I just saw MessageStressTest code. You forgot to call the size() method to invoke the creation of the EntrySet object and of the iterator object. It will slow down and add another garbage for the HashMap version test. 

public long size()  {
       ....
        header_lock.readLock().lock();
        try {
            for(Iterator it=headers.entrySet().iterator(); it.hasNext();) {
                entry=(Map.Entry)it.next();
                key=(String)entry.getKey();
                retval+=key.length() +2; // not the same as writeUTF(), but almost
                hdr=(Header)entry.getValue();
                retval+=(Global.SHORT_SIZE *2); // 2 for magic number, 2 for size (short)
                retval+=hdr.size();
            }
        }
        finally {
            header_lock.readLock().unlock();
        }
   ...
}

> Message: investigate making the overhead for headers smaller
> ------------------------------------------------------------
>
>                 Key: JGRP-806
>                 URL: https://jira.jboss.org/jira/browse/JGRP-806
>             Project: JGroups
>          Issue Type: Task
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 2.6.4, 2.7
>
>
> Related to https://jira.jboss.org/jira/browse/JGRP-805.
> See whether we can make the overhead for ConcurrentHashmap in Message smaller. Potentially reduce the number of buckets for each CCHM (default: 16, IIRC). Or replace CCHMs altogether ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list