Dev server startup taking 4-5 minutes to restart after each code change


I’m trying to get started with developing on Rocket.Chat and hopefully submitting some PRs soon :smile:

However, each time I make a code change to trigger a restart, the app takes 4-5 minutes to rebuild.

I’ve got a Macbook Pro 2.7Ghz quad-core CPU, 16GB ram and SSD HD.

I’ve been developing with Meteor for many years and I have other Meteor apps that I’ve developed which build in around 15 seconds with around 10K-20K lines of code. I know the RC codebase is quite large but is it so large that it would take 300 seconds for each rebuild? 20x slower than a typical Meteor app?

Hopefully I’m just doing something wrong but if it really does take that long then I’m curious if there are any tricks that you guys use to speed things up? Perhaps taking advantage of some of Meteor’s recent build performance improvements around conditional builds?


Server Setup Information

  • Version of Rocket.Chat Server: 3.7.0
  • Operating System: Mac OSX 10.13.6
  • Deployment Method: meteor npm start
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Yes
  • NodeJS Version: 12.16.1
  • MongoDB Version: 4.2.8

Any additional Information

SOLVED: I had connected my local dev instance of RC to a cloud-hosted DB at MongoDB Atlas and the main culprit was the latency between my local dev machine and Atlas. During startup, RC makes a large number of database queries to initialize things like settings, permissions, etc. Switching to a mongo server on my local dev machine reduced the server startup step (after build) from 250 seconds to 22 seconds :slight_smile: