The way feed is generated is not good as the buffer is kept in memory and then flush to the client. You should implement a streamed solution, so there is no buffer on the php side, and the TTFB will be better.