为什么已部署的Meteor站点加载需要这么长时间? [英] Why does a deployed Meteor site take so long to load?

查看:100
本文介绍了为什么已部署的Meteor站点加载需要这么长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个非常简单的应用程序,我的Meteor站点花费4.1秒的时间开始下载数据的第一个字节.这是一个非常基本的设置.相关时间等(取自 http://www.webpagetest.org )是:

For a very simple application, my Meteor site is taking 4.1s to start downloading the first byte of data. This is with a very basic setup. The relevant times etc (taken from http://www.webpagetest.org) are:

IP: 107.22.210.133
Location: Ashburn, VA
Error/Status Code: 200
Start Offset: 0.121 s
DNS Lookup: 64 ms
Initial Connection: 56 ms
Time to First Byte: 4164 ms
Content Download: 247 ms
Bytes In (downloaded): 0.9 KB
Bytes Out (uploaded): 0.4 KB

这是由于Meteor运行缓慢还是在我的代码中出现了瓶颈?有办法确定吗?

Is this due to Meteor being slow, or is there likely to be a bottleneck in my code? Is there a way to determine this?

谢谢.

推荐答案

该延迟是您的订阅从服务器获取数据所需时间的函数.如果客户端在页面加载时需要的任何文档数据是静态的,请将其存储在非托管(不同步)的本地集合中,以便在初始页面加载时立即可用.请参阅 collections.meteor.com ,以比较存储在非托管集合和托管集合中的数据的加载时间.

That delay is a function of the time it takes your subscriptions to get data from the server. If any of the document data the client needs on page load is static, store it in unmanaged (unsynchronized) local collections so it is available immediately on initial page load. See collections.meteor.com for a load time comparison of data stored in an unmanaged versus a managed collection.

这篇关于为什么已部署的Meteor站点加载需要这么长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆