[jboss-jira] [JBoss JIRA] (JGRP-1982) RequestCorrelator: use IntHashMap / LongHashmap for request correlation
Bela Ban (JIRA)
issues at jboss.org
Wed Jan 6 10:08:00 EST 2016
[ https://issues.jboss.org/browse/JGRP-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145395#comment-13145395 ]
Bela Ban edited comment on JGRP-1982 at 1/6/16 10:07 AM:
---------------------------------------------------------
Hmm, we could check whether we find a contiguous amount of free space, and do compaction, e.g.
||0||1||2||3||4||5||6||7||
|0|-|-|-|-|-|-|7|
Here we have an array of capacity=8, with request IDs 0 (at index 0) and 7 (at index 7). We have 6 free array slots available for compaction. We could therefore compact the array to (say) 4 (or even 2):
||0||1||2||3||
|0|-|-|7|
0 mod 4 is index=0 and 7 mod 4 is index=3, so this works as long as we find half of the buffer size more free slots.
The question is _when_ to check if the array can be compacted and determining the minimum number of free slots for compaction...
was (Author: belaban):
Hmm, we could check whether we find a contiguous amount of free space, and do compaction, e.g.
||0||1||2||3||4||5||6||7||
|0|-|-|-|-|-|-|7|
Here we have an array of capacity=8, with request IDs 0 (at index 0) and 7 (at index 7). We have 6 free array slots available for compaction. We could therefore compact the array to (say) 4 (or even 2):
||0||1||2||3||
|0|-|-|7|
0 mod 4 is index=0 and 7 mod 4 is index=3, so this works.
The question is _when_ to check if the array can be compacted and determining the minimum number of free slots for compaction...
> RequestCorrelator: use IntHashMap / LongHashmap for request correlation
> -----------------------------------------------------------------------
>
> Key: JGRP-1982
> URL: https://issues.jboss.org/browse/JGRP-1982
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.6.7
>
>
> In RequestCorrelator (and possibly other classes), use an IntHashMap or LongHashmap for the request table. Goal: use less space when we have a lot of requests.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list