[ 
https://issues.apache.org/jira/browse/ARTEMIS-3618?focusedWorklogId=698716&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-698716
 ]

ASF GitHub Bot logged work on ARTEMIS-3618:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Dec/21 14:24
            Start Date: 20/Dec/21 14:24
    Worklog Time Spent: 10m 
      Work Description: franz1981 opened a new pull request #3888:
URL: https://github.com/apache/activemq-artemis/pull/3888


   https://issues.apache.org/jira/browse/ARTEMIS-3618


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 698716)
    Remaining Estimate: 0h
            Time Spent: 10m

> Faster Artemis CORE client MessageListener::onMessage without SecurityManager
> -----------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3618
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3618
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Major
>         Attachments: noSecurityManager.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently {{{}ClientConsumerImpl{}}}, responsible of calling JMS 
> {{{}MessageListener::onMessage{}}}, is installing/restoring the listener 
> thread's context ClassLoader by using a secured action regardless any 
> security manager is installed.
> This secured action (using {{{}AccessController::doPrivileged{}}}) is very 
> heavyweight and can often be as costy (or more) then the user/application 
> code handling the received message (see 
> [https://bugs.openjdk.java.net/browse/JDK-8062162] for more info).
> The {{SecurityManager}} will be removed in the future (see 
> [https://openjdk.java.net/jeps/411]) but until that moment would be nice to 
> reduce such cost at least if no {{SecurityManager}} is installed.
> This is a flamegraph showing the listener stack trace:
> !noSecurityManager.png|width=920,height=398!
> As the image shows, in violet, here's the cost of 
> {{AccessController::doPrivileged}} is no {{SecurityManager}} is installed ie 
> 14 samples
>  - handling the message costs 3 samples
>  - acknowledge it costs 19 samples
> TLDR {{AccessController::doPrivileged}} cost ~5 times handling the message 
> and nearly the same as acking back it



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to