ItsMadruga / MdgWa

Um módulo Xposed para personalizar seu WhatsApp.
https://coindrop.to/itsmadruga
GNU General Public License v3.0
186 stars 39 forks source link

Optimizing codebase & XSharedPreferences performance #9

Closed BryanGIG closed 3 months ago

BryanGIG commented 3 months ago

Description

  1. Due to XSharedPreferences::reload being an expensive function in a SELinux-enforced device, creating a new instance every time getPref is called is not a good idea.
  2. Adding @NonNull in XHookBase helped reduce some lines and contribute to the safety codebase.
  3. I also extract some long functions into separate functions to ensure readability, such as getAsn1TaggedObject and getAsn1OctetString.