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 .
最佳答案
在 GitHub 存储库中,node.js 仅用于演示。您可以使用适合您需要的任何后端。
观察到的性能可能是因为您没有考虑实时 PHP 服务器的网络传输时间。您不会在 node.js 服务器上观察到它,因为它在您的机器上本地运行。因此,传输时间非常短。
如果两者都在您的机器上本地运行,并且您仍然观察到性能差异,那么您是对的,node js 中的异步 IO 是它为您提供更好网络性能的原因。
我建议您将布局缓存在您的 Android 应用程序中,以加快后续加载速度。
关于android - 要有效地使用 proteus,我需要在 node.js 环境中托管文件还是 php 才能正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43563664/