Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

SECURITY-786 Improve Memory Performance #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marschall
Copy link
Contributor

We did some profiling of or JBoss AS instance and noticed that audit
logging on JavaEE resources is causing most of our allocations outside
TLAB s. This was a bit surprising to use since we don't have audit
logging on. We tracked them down to
org.jboss.security.javaee.AbstractJavaEEHelper.authorizationAudit
which unnecessarily does an eager string conversion of every
org.jboss.security.authorization.Resource. This could be done lazily
on demand when audit logging is on in AuditEvent#toString. Since the
map is already of type Map<String,Object> simply removing the
call to #toString() fixes this.

  • don't do eager string conversion of resources in
    AbstractJavaEEHelper#authorizationAudit

Issue: SECURITY-786
https://issues.jboss.org/browse/SECURITY-786

We did some profiling of or JBoss AS instance and noticed that audit
logging on JavaEE resources is causing most of our allocations outside
[TLAB] [1] s. This was a bit surprising to use since we don't have audit
logging on. We tracked them down to
`org.jboss.security.javaee.AbstractJavaEEHelper.authorizationAudit`
which unnecessarily does an eager string conversion of every
`org.jboss.security.authorization.Resource`. This could be done lazily
on demand when audit logging is on in `AuditEvent#toString`. Since the
map is already of type `Map&lt;String,Object&gt;` simply removing the
call to `#toString()` fixes this.

 * don't do eager string conversion of resources in
   `AbstractJavaEEHelper#authorizationAudit`

 [1]: http://openjdk.java.net/groups/hotspot/docs/HotSpotGlossary.html#TLAB

Issue: SECURITY-786
https://issues.jboss.org/browse/SECURITY-786
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant