undozen / bigpipe-on-node Goto Github PK
View Code? Open in Web Editor NEWimplementing bigpipe on node.js
implementing bigpipe on node.js
你好,看了bigpipe-on-node的相关介绍,给我的感觉bigpipe-on-node不仅不能改善页面加载性能,相反还会降低。
套用介绍里面的例子,假如后台需要做两个IO关联处理,A耗时3秒,B耗时5秒。
那么用node.js,理想情况下浏览器接受到response的时间是5秒(2者之间的最大值),
而并非8秒。
采用bigpipe分块发送,那么理想情况下,浏览器在第三秒末接受到A的response,第5秒后接受到B的response。
总时间是一样的,而bigpipe才用分块发送,传输效率应该会有点损耗,而且JS来渲染的效率肯定是远远低于服务端。
故,bigpipe-on-node想法会降低面加载性能。顶多只能说是改善了一下加载体验(用户在第3秒末就可以浏览到A相关信息)
如有错误请指正,谢谢!
npm install
node app.js
之后
还是没有正常的弹出alert
hi,I have tried your page in safari,but not woking.The page shows when the last pagelet arrived.but it's ok in chrome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.