As of now all queries take in the username parameter and fetch the userid from the database.
Each call to fetch userId from username takes around 0.13 seconds. All the queries combined call this 5 times. It would save us roughly around 0.5 seconds if we just fetch the userid once.
In nutshell, not a great optimization but every second count, so making this change. :)
As of now all queries take in the
username
parameter and fetch theuserid
from the database.Each call to fetch userId from
username
takes around0.13
seconds. All the queries combined call this 5 times. It would save us roughly around 0.5 seconds if we just fetch theuserid
once.In nutshell, not a great optimization but every second count, so making this change. :)