r/Meteor•
voidZero-

How many packages is too many packages?

I'm working on a prototype of a website concept I created a few weeks ago. I'm 1 week in the development and a question occurred to me: how many custom packages do you have on your average medium meteor project? I start with just iron router, but in midst of development I tend to add a lot more, upon demand. I wonder if this is bad and if I should worry about performance impacts having many packages would cause.

Posted May 23, 2015, 3:24 PM UTC

26
imslavko•

I think there are different ways to understand when something is too much:

  • when two packages are fighting over a similar role or area of usage (like you wouldn't have 2 different forms packages, or 2 different internationalization packages)
  • when your JS bundle size blows up to more than X Mb. For me X is something like 3 (gzipped).
3
frenchthief•

I'm working on a large project to which so far has I've added 60 packages (there are 147 total dependencies). The initial page load is 817 KB, so it's still reasonable.

It's a good idea to check the contents of a package before adding it. When you actually look at the contents of most packages they are very small. If you need only a small part of a large package's functionality, you can always copy that part for yourself and make your own package.

3
cmn_jcs•

Our website (mostly basic stuff, has a fairly simple store): 19 direct dependencies, 77 direct and indirect dependencies

Our app (in progress): 32 direct dependencies, 73 direct and indirect dependencies

2
yourwatchisnice•

How do you check this?

2
cmn_jcs•

Packages? I counted in .meteor/packages, though you could also easily do meteor list. For dependencies, I looked at .meteor/versions.

2
yourwatchisnice•

Thanks, I wanted to be sure I was looking at the right thing.

2