流星+ React + Antd-如何加快构建/重建时间? (避免减少插件延迟) [英] Meteor + React + Antd - How to speed up build/rebuild time? (avoid less plugin delay)

查看:195
本文介绍了流星+ React + Antd-如何加快构建/重建时间? (避免减少插件延迟)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我的流星项目中卸载antd可使构建时间平均减少38-40s.探查器显示,较少的插件需要> 38s来处理antd的大量存档:

Uninstalling antd from my meteor project drops the build time by 38-40s on average. The profiler shows that plugin less needs >38s to deal with antd's huge less archive:

VELOCITY_DEBUG=1 VELOCITY_DEBUG_MIRROR=1 METEOR_PROFILE=1 meteor | grep less
...
| other plugin less.......................................38,766 ms (2)
...

当我卸载antd时,该数字降至< 1s(572ms):

this number drops to <1s (572ms) when i uninstall antd:

| other plugin less..........................................572 ms (2)

> 30s太长了,无法在开发过程中等待应用程序刷新.

>30s is simply too long to wait for the app to refresh during development.

有人知道避免这种延迟的策略吗?

Does anyone know a strategy to avoid this delay?

推荐答案

好像即将到来的流星更新解决了这个问题.

Looks like the upcoming meteor update fixes this.

我更新到了最新的beta:

I updated to the recent beta:

meteor update --release 1.7.1-beta.10

用探查器重新启动流星:

restarted meteor with the profiler:

VELOCITY_DEBUG=1 VELOCITY_DEBUG_MIRROR=1 METEOR_PROFILE=1 meteor --inspect | grep 'less\|Total'

,现在less插件在文件保存中的时间少于1秒
并且总的重建时间又回到了合理范围内:

and now the less plugin is taking way less than 1 second on file save
and total rebuild time is back within reason:

|    │     │  ├─ plugin less                                       45 ms (2)
| (#5) Total: 4,270 ms (Rebuild App)

这篇关于流星+ React + Antd-如何加快构建/重建时间? (避免减少插件延迟)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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