performance and logging related changes

1. performance improvement for fetching statistics, following the approach 3 in the below document:

https://docs.google.com/document/d/1Jtrt54wfDavn171IzNoRAQ-06yhgczXq3um0kPY20YQ/edit

2. added loggers when entering and exiting any method