Skip to content

Memoize: Debugging stats investigations #48319

@kacper-mikolajczak

Description

@kacper-mikolajczak

Problem

The cache debugging stats provided via Jason's AppInfo file, show a couple of issues related to memoization:

Actual Desired Action
Some of the memoized functions lack identifiers Each function should have id to be distinguishable Add monitoringName property to inlined functions passed to memoize
Memoized functions that have 100% cache hit ratio have avgFnTime equal to zero avgFnTime should be equal to at least first function call time Register first function call and add it as starting point of avgFnTime
getEmojiUnicode cache retrieval tends to be slower than actual function call Retrieval should be faster than the actual function call Analyze memoization for getEmojiUnicode
getLocaleDigits seems to not be used at all The function may be underused, possibly due to a specific flow Jason performed Reason about adding memoize stats data to analytics in order to have more, varying test samples
getUnreadReportsForUnreadIndicator retrieval/execution times are way above expected (8ms/22ms) Retrieval/execution should be faster Investigate the function
freezeScreenWithLazyLoading creates many unnamed empty cache entries Cache entries should be limited to one per function Check how we can cache it effectively and add monitoringName
getItemHeightMemoized lacks id It should be properly referenced Add monitoringName
cacheRetrievalTime measures the time for the cache itself but not for the entire memoize overhead We should also track entire memoize helper overhead Add memoizeFnTime as a new mark or change cacheRetrievalTime to be measured from function start

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions