Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
192 views
in Technique[技术] by (71.8m points)

reactjs - Meteor + React + Antd - How to speed up build/rebuild time? (avoid less plugin delay)

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)
...

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

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

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

Does anyone know a strategy to avoid this delay?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like the upcoming meteor update fixes this.

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'

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)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...