reactjsmeteorantdmeteor-react

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?


Solution

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