facebook / facebook/hermes

Performance Issue with hermes when we use crypto-js Library

Open
#735 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description

We are using the crypto-js library to perform encryption and decryption tasks in our react-native app.
After enabling Hermes in the Android application these tasks are taking 5x time as compared to Hermes was disable

- [] I have run `Gradle clean` and confirmed this bug does not occur with JSC

Hermes version: 0.9.0
React Native version (if any):0.66.4
OS version (if any): Android 11
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):

## Steps To Reproduce

code example:

Initially, the below code takes 1.5 sec to perform the task, but after enabling the Hermes it takes 6 sec to perform

` const keyInside = CryptoJS.enc.Base64.parse(encryptionKey.value);
const encryptedResult = CryptoJS.AES.encrypt(json, keyInside, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })`

## The Expected Behavior

It should perform as efficiently as it was working before enabling hermes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.