Search code examples
androidproteus

To use proteus effectively do i need to host file in node.js environment or php just works fine?


On github proteus says to test proteus locally install node.js . I know it sounds a quite dumb question but i am just curios but it . and i am asking this question because i have observed performance difference when i test proteus locally when files are hosted on node.js and on live server with php environment . with node.js rendering is super fast but thats not the case with php. i am not backend developer so i dont have much idea about it please correct me if i am wrong .


Solution

  • In the GitHub repository, node.js is only being used for the demo. You can use whichever backend that suits your need.

    The observed performance might possibly be because you are are not accounting for the network transfer time from the live PHP server. You do not observe that on the node.js server because it is running locally on your machine. Therefore that transfer time is very low.

    If both are running locally on your machine, and you still observe a performance difference, then you are right, and the asynchronous IO in node js is the reason why it gives you better network performance.

    I suggest you cache your layouts in your Android Application to make subsequent loads faster.