hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hirthwork <...@git.apache.org>
Subject [GitHub] httpcore pull request: Reduce synchronized scopes in IOSessionImpl
Date Wed, 12 Nov 2014 10:39:40 GMT
Github user hirthwork commented on the pull request:

    Yes, this is a part of performance improvement, but I don't believe you want to have these
[crutches](https://gist.github.com/hirthwork/f0f1a6693690774c1cb0) in master. The idea is
to move channel.close() to separate thread. Channel can be also closed by selector, so before
closing channel is being registered in fake selector, so main IOReactor thread won't be blocked.
    Using volatiles for lastRead/Write/AccessTime is the generic improvement which will improve
performance of current implementation.
    Using atomic for status doesn't look like a fair tradeoff. You will improve performance
of .close() function a bit, but other functions will be forced to call status.get() inside
the lock, so overall performance could degrade. close() is called once per session lifetime
while event mask operations can be called several times (hundreds of times for proxies like
NHttpReverseProxy from examples).

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message