Closed Bug 1258810 Opened 8 years ago Closed 8 years ago

Remove Base32 Dependency

Categories

(Firefox for iOS :: Build & Test, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 4.0+ ---

People

(Reporter: st3fan, Assigned: st3fan)

Details

Attachments

(1 file)

We only use the Base32 dependency to convert back and forth between hexadecimal String and NSData. This is a lot of overhead for something that could also be a simple extension that we write.
This patch removes the need for the *Base32* dependency. We only use that library for converting between hexadecimal `String` and `NSData`. That is a lot of overhead.

This patch implements simple and unoptimized hex encoding/decoding. We only use this on short values like hashes so I did not spend a lot of time on making sure this uses as little memory as possible or runs as fast as it can.

The advantages of getting rid of a dependency, and this on in particular:

* We forked this dependency, so we don't have to own it anymore
* Our `.ipa` size shrinks a bit
* Build and Link times go down
* App startup time goes down
* Simplified build because there is less to do

:8ball:
Attachment #8733504 - Flags: review?(sleroux)
Attachment #8733504 - Flags: review?(etoop)
Comment on attachment 8733504 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1657

Code looks good. Yay for removing dependencies!
Attachment #8733504 - Flags: review?(sleroux) → review+
Comment on attachment 8733504 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1657

LGTM. +1 for :sleroux's test location comment
Attachment #8733504 - Flags: review?(etoop) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: