how to improve waiting (ttfb) code example
Example: waiting ttfb too long
short answer:
optimize server-side processing ( like making SQL query and such ).
if you sure that your server-side processing is optimized:
change db server from 'localhost' to '127.0.0.1'
long answer:
often times especially in PHP app
when you are making database server connection to 'localhost' it takes
nearly twice as longer as making connection to '127.0.0.1'
i'm not well qualified expert in that particualar question, but
i think it takes time to reslove that localhost is the 127.0.0.1