Revert "Revert "ActivityManager: memoize for performance""

This reverts commit 4a3c85e51ba0e41d4fe40b51996cb03915a753e9.
Revert "Revert "activity manager tweak-a-roonie""

This reverts commit c2c4ff7b6ebb9ea7694cf3bd814fc66f852df66f.