LabVIEW-WebSockets-API icon indicating copy to clipboard operation
LabVIEW-WebSockets-API copied to clipboard

Improve Base64 encode/decode performance

Open samsharp99 opened this issue 6 years ago • 2 comments

For large packet sizes (>1Mb), the Base64 encode/decode functions are not performant.

Investigate and see if improvements can be made to increase library performance.

samsharp99 avatar Nov 30 '19 16:11 samsharp99

I'd love some feedback on this library, performance-wise. https://github.com/LabVIEW-Open-Source/Serializer.Base64

I know it is 15% faster than the one found on NI forums for short strings (such as PEM certificates), but I have not tested it for large payloads. I assume a sort of in-place algorithm is what you're looking for... I'm interested in working on this. Let me know.

francois-normandin avatar Oct 26 '20 00:10 francois-normandin

ok, this one is really a gem: https://forums.ni.com/t5/Example-Code/Fast-Base64-Encoder-Decoder-using-LabVIEW It is MIT license, so I'll include in the one I mentioned above.

By the way, this is the kind of improvement you're looking at for a 800kB payload: image (I toggled between my take on Base64 and this VI)

It does not check for validity of the string though, such as removing all whitespaces (space, tabs, CR, LF, etc.)

francois-normandin avatar Oct 26 '20 23:10 francois-normandin