mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Valliere <jon.valli...@emoten.com>
Subject Re: [jira] [Commented] (DIRMINA-1095) Seems like the management f UDP sessions is really unneficient
Date Fri, 18 Jan 2019 22:22:39 GMT
I suggest creating the 2.X branch and continue that as the master for all 2
releases. Tag everything else.

On Fri, Jan 18, 2019 at 4:32 PM Emmanuel Lecharny (JIRA) <jira@apache.org>
wrote:

>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16746680#comment-16746680
> ]
>
> Emmanuel Lecharny commented on DIRMINA-1095:
> --------------------------------------------
>
> Jonathan,
>
> sorry for the delayed response, way to many stuff on my plate those last
> weeks...
>
> I think we should move to 2.1.x for this change. 2.0.x should probably be
> left for pure maintenance.
>
> > Seems like the management f UDP sessions is really unneficient
> > --------------------------------------------------------------
> >
> >                 Key: DIRMINA-1095
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-1095
> >             Project: MINA
> >          Issue Type: Improvement
> >    Affects Versions: 2.0.19
> >            Reporter: Emmanuel Lecharny
> >            Assignee: Jonathan Valliere
> >            Priority: Major
> >             Fix For: 2.0.20
> >
> >
> > When we process incoming UDP messages, we iterate over the activated
> {{SelectionKey}}s. That's ok, but for each one of them, we read the data
> and try to flush the scheduled messages. The loop where it's done seems to
> iterate on *all* the managed sessions, for each keys we are processing :
> > {code:java}
> >    private void processReadySessions(Set<SelectionKey> handles) {
> >         Iterator<SelectionKey> iterator = handles.iterator();
> >         while (iterator.hasNext()) {
> >             SelectionKey key = iterator.next();
> >             DatagramChannel handle = (DatagramChannel) key.channel();
> >             iterator.remove();
> >             try {
> >                 if (key.isValid() && key.isReadable()) {
> >                     readHandle(handle);
> >                 }
> >                 if (key.isValid() && key.isWritable()) {
> >                     for (IoSession session :
> getManagedSessions().values()) {
> >                         scheduleFlush((NioSession) session);
> > ...
> > {code}
> > There is no reason to do so. First, we should not iterate on all the
> managed sessions (we may have thousands), but only the sessions which have
> something to write, and we certainly should not do that for every active
> key...
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>
-- 

CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
confidential and/or privileged information and may be legally protected
from disclosure.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message