Buffer Performance Improvements

I’m having performance issues with the buffer module in realm functions, a simple function to transform base64 string to a buffer taking too long

exports = function(){
  const b64 = "string buffer goes here"
  Buffer.from(b64, "base64");
  return "Hello World!";
};

This code run a buffer from a base64 string of less than 300 characters

> ran at 1647901093222
> took 284.162459ms
> result: 
"Hello World!"
> result (JavaScript): 
EJSON.parse('"Hello World!"')

Look what happens when the base64 string have more characters:
This code is running a buffer from a base64 string of less than 100000 characters and more than 90000 ( i have not exactly value of characters)

> ran at 1647901049377
> took 4.796402983s
> result: 
"Hello World!"
> result (JavaScript): 
EJSON.parse('"Hello World!"')

G’Day @Royal_Advice,

Thank you for raising your concern.

This is different from the external dependency issue, so I have separated this. Buffer is an internal module and the engineering team is aware of the buffer slowness issue.

The team is working on improvements. I will update you as more information comes to light.

Cheers, :performing_arts: