Alright, I normally don’t ask for help, but on this one I am a little baffled.
I am working on a website where we do a ajax post, that goes through my Magento module’s IndexControler and sends back a list of the available options. Pretty straight fowatd.
Everything works but for some reason the time to first byte is 800ms, which is too long (you start trying to click the select before the options are populated).
At first I thought it was my DB calls, so I completely removed all DB calls and set a static array.
{"models":[{"id":"5","name":"iPhone 5"},{"id":"6","name":"iPhone 5s"},{"id":"7","name":"iPhone 6"},{"id":"8","name":"iPhone 6+”}]}
Tested it, and the time to first byte was still 800ms. So after that I set up the file in its own local .php file on the same server and ran the test and it returned a 90ms, which is exactly what I expected…
So my question is this - where and what is causing Magento to have such a long time to first byte, and do you have any ideas?
- I’ve already shift to sending my responses to json, and that did shave off 50ms it wasn’t enough to make it fell responsive enough to use in production.