On 16/01/2013 06:50, Mladen Turk wrote:
> On 01/15/2013 02:29 PM, Mark Thomas wrote:
>> Hi,
>>
>> 3. Currently, we have no record of which Poller a socket is registered
>> with. This makes 2) more expensive as we have to iterate through the
>> Pollers to find the socket. Tracking the current poller used by a socket
>> would make 2) a cheaper operation.
> 
> Think this can be done with relative ease.
> I recently made some changes to native pollset performance
> (removing multiple linear scans for sockets if they are in the pollset)
> which can reference the pollset with socket.
> 
> In theory this allows to remove the socket from 'any' pollset which
> means that you can remove the socket from pollset without knowing to
> which one it belongs.
> 
> If there is a need for reconfigure (different signaling events)
> we can add an extra API call that would allow that, without the need
> to know for which pollset this is.

That would be really nice. What I'd need is this:

int removeFromPollset(long socket)

where the return value is either -ve for an error code or +ve for the
current flags.

Looking at the code, by the time I have finished the other changes the
change above would be a nice to have but not essential.

One of the changes that will help (Remy already did this in his fork) is
to move from:
1 pollset <-> 1 poller, 1 endpoint <-> multiple pollers
to:
1 endpoint <-> 1 poller, multiple pollsets <-> 1 poller

This is next on my todo list.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to