Build Performance


#1

First, hello Reaction Team!

Thank you for creating Reaction Commerce. I am amazed by the product and what’s behind it.
I started to build a meteor application and wanted to integrate it with Reaction Commerce.
Finally I decided to build a plugin instead of using DDP. Now I have several questions:

  1. Everytime I restart reaction or doing a reaction reset -n it takes a long time to start it. (2-3 Minutes) Is that normal? Can it be accelerated by avoiding rescanning everything again and again? The only changing part which Meteor should watch is my plugin
  2. After a change in my custom plugin it takes about 20s to reload a page. Can that in any way be accelerated? Even putting all the Ressources into a RAM Disk didn’t accelerate the buildprocess much.
  3. How can I define static ressources like images in my plugin?
  4. Is there any way I can define additional npm packages in the plugin scope?

After I see how the developement slowed a bit down, I am not sure if the plugin strategy over DDP was the right choice.

Best regards

Manu


#2

Hello Manu,

Those are good questions.

  1. Yes, it’s normal for Reaction to take a couple of minutes to restart. It has to compile the entire project from scratch. However, it’s important to note that during development you do not need to restart Reaction to see your changes. Meteor will automatically determine that files have changed and restart the appropriate part (either client or server). This normally only takes a small fraction of the time it takes to restart (maybe 10-20 seconds)

  2. Unfortunately that’s how long it takes. I will expect that newer versions of Meteor (and Reaction) will be able to speed it up some.

  3. Right now you cannot. We would suggest putting any static images/etc in /public/custom.

  4. This is also something we are looking at doing but right now you will need to add it to the top-level package.json or just have a local package.json and run meteor npm install manually.


#3

Just an update that the newest version of the reaction-cli now allows you to define a package.json in the plugin root. Allowing plugins to install their own npm packages.


#4

Thank you very much for the info. I really appreciate your responsive help.