openwallet-foundation-labs / identity-credential

Apache License 2.0
166 stars 84 forks source link

Applications feel sluggish #387

Open davidz25 opened 1 year ago

davidz25 commented 1 year ago

After the switch to Jetpack Compose, both the holder and reader applications now feel slow and sluggish. For example on the android-credential-manager branch it takes a good 2-3 seconds after receiving the response until we switch to the Fragment where the results are displayed. This issue is for investigating and finding the root cause.

davidz25 commented 1 year ago

It looks like a lot of the sluggishness comes from printing out Diagnostics CBOR. Removing that, and we're pretty fast again...

davidz25 commented 1 year ago

Maybe the solution here is to have two checkboxes in the apps:

 [X] Debug logging activated
 [ ] Show CBOR and Hexdumps

with Logger.d() being on by default and Logger.dCbor() and Logger.dHex() being off by default. It's pretty easy to add API on Logger class to do this.

davidz25 commented 1 year ago

Before we do this, we should figure out what's so slow about logging... it's hard to believe it takes a lot of CPU cycles printing CBOR in diagnostics form, maybe the expensive part is just logging messages.