Status

()

Firefox for iOS
Build & Test
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: st3fan, Assigned: st3fan)

Tracking

unspecified
Other
iOS

Firefox Tracking Flags

(fxios4.0+)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
Created attachment 8733504 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1657

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+
(Assignee)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

2 years ago
https://github.com/mozilla/firefox-ios/commit/565568b1f9a9517d1747fee5a6654d7ea82e3ff8
You need to log in before you can comment on or make changes to this bug.