mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff MAURY (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-934) Replace synchronized with a Semaphore for better performance
Date Fri, 12 Jun 2015 21:29:01 GMT

    [ https://issues.apache.org/jira/browse/DIRMINA-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584118#comment-14584118
] 

Jeff MAURY commented on DIRMINA-934:
------------------------------------

Emmanuel,

I think I got your point. The idea behind the decoderOut is that it is currently implemented
as a queue of generated messages that are sent to the next filter upon flush. The problem
is that as it is bound to the session, then we need a lock in case 2 ProcotolCodec filters
got executed concurrently.
My proposition is the following:
 * remove the synchronisation
 * replace the getDecoderOut by an overriding method (it is private in 2.0 so it cannot be
overriden) and remove the session storage and return a new object each time it is called.

> Replace synchronized with a Semaphore for better performance
> ------------------------------------------------------------
>
>                 Key: DIRMINA-934
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-934
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.7, 2.0.8
>         Environment: Window 8 Pro x64, JDK 7
>            Reporter: Paul Gregoire
>              Labels: patch
>             Fix For: 2.0.8
>
>         Attachments: ProtocolCodecFilterWithSemaphoreAndMore.diff
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Replacing the synchronized block with a Semaphore in the ProtocolCodecFilter provides
a lot of benefit in terms of locking and also reduces CPU utilization. See attached git diff.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message