Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Fix a performance issue with decoding base16 encoded string #207

Closed
wants to merge 23 commits into from

Conversation

iCell
Copy link

@iCell iCell commented Jul 5, 2019

There is a serious performance issue when decoding base16 encoded string. The corresponding code is EosioSwift/Extensions/DataExtensions.swift.

When we tested using stake action, the encoded hex string (which can be found here) passed to the Authenticator app, then the app decoded the string, and it stuck, maybe crash sometimes. Then we tested using transfer action, everything worked fine except we need to wait a long time in decoding.

So, we tried to imporve the method of decoding base16 encoded string, using the solution provided by mattrubin/Bases, which performed very well. But unfortunately, it does not support Cocoapods, so we forked the repo to support cocoapods.

From the results, the performance after replacing the decoding method is on the order of milliseconds, while the original decoding performance is ten seconds or even more.

@iCell iCell force-pushed the bugfix/base16-decode branch from 2483ca4 to 8c78465 Compare July 5, 2019 03:04
@brandonfancher
Copy link
Contributor

@iCell Thanks for the bug report and PR. We'll get this processed and reviewed soon.

@brandonfancher brandonfancher added the bug Something isn't working label Jul 5, 2019
@mjohnson12
Copy link
Contributor

This is being fixed in #229.

@mjohnson12 mjohnson12 closed this Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants