Hi All,
I’m just posting this just in case it helps anyone else out, as I managed to ‘fix’ the issue.
My issue: Slow build times in the Dev environment.
The problem was really slowing my development as I had gotten really used to the hot module replacement feature where I would iterate on code, save and see the results in the browser pretty much immediately.
I’m using a Mac and React for my project.
For no reason I could think of, one day build times increased dramatically. I put up with it for a while, but it was getting more and more frustrating, so I decided to do something about it.
I looked through my code, made sure all my 3rd party code was up to date, restarted my machine, even did a meteor reset. None of which worked.
I then saw the Environment variable you can set that will give you a verbose output when meteor is building. So I gave that a go to see what was causing the issue.
Basically run: METEOR_PROFILE=1 meteor --settings settings.json
(no need for the settings bit, it’s just that I have some dev env. settings).
On initial build, I get a load of info.
On file change, I get another (smaller) dump of info.
Here’s the funny thing though - my builds have sped up again!!
I quit meteor and re-run without the profiler on, and build speeds are still fast.
So, something about running with the profiler on has ‘cleared out’ whatever was causing my slow builds.
Like I said, I don’t really know why they started in the first place as I had only changed a few lines of my code and not installed or updated anything. I had tried all sorts before trying the profiler too.
I’m curious to hear if other people have the same problem and this little ‘trick’ cured it for them too…