You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2024/09/17 19:57:00 UTC

[jira] [Updated] (ARTEMIS-5048) Use java.util.Base64

     [ https://issues.apache.org/jira/browse/ARTEMIS-5048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram updated ARTEMIS-5048:
------------------------------------
    Description: 
We've traditionally used {{org.apache.activemq.artemis.utils.Base64}} for Base64 encoding/decoding. This implementation is based on public domain code from http://iharder.net/base64. 

In Java 8 {{java.util.Base64}} was introduced. I assumed we hadn't switched to this implementation for performance reasons so I created a simple JMH-based test to compare the two implementations and it appears to me that {{java.util.Base64}} is significantly faster than our current implementation. Using the JDK's class will simplify our code _and_ improve performance. Also, it should be 100% backwards compatible since Base64 encoding/decoding is standardized.

  was:
We've traditionally used {{org.apache.activemq.artemis.utils.Base64}} for Base64 encoding/decoding. This implementation is based on public domain code from http://iharder.net/base64. 

In Java 5 {{java.util.Base64}} was introduced. I assumed we hadn't switched to this implementation for performance reasons so I created a simple JMH-based test to compare the two implementations and it appears to me that {{java.util.Base64}} is significantly faster than our current implementation. Using the JDK's class will simplify our code _and_ improve performance. Also, it should be 100% backwards compatible since Base64 encoding/decoding is standardized.


> Use java.util.Base64
> --------------------
>
>                 Key: ARTEMIS-5048
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5048
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>
> We've traditionally used {{org.apache.activemq.artemis.utils.Base64}} for Base64 encoding/decoding. This implementation is based on public domain code from http://iharder.net/base64. 
> In Java 8 {{java.util.Base64}} was introduced. I assumed we hadn't switched to this implementation for performance reasons so I created a simple JMH-based test to compare the two implementations and it appears to me that {{java.util.Base64}} is significantly faster than our current implementation. Using the JDK's class will simplify our code _and_ improve performance. Also, it should be 100% backwards compatible since Base64 encoding/decoding is standardized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact