Globals vs. Imports - Performance difference

I’ve been using Meteor since January 2015, and have deployed a few apps using React+Meteor.

I know that using the imports directory structure makes code look more organized, modular and suitable for medium/large projects. However, I personally find having import statements and index files everywhere a bit tedious and intrincated/confusing.

My question is: are there noticeable differences between using globals instead of imports? Is the added complexity worth it? Does anyone have any metrics on this?

Isn’t it for code manageability/maintainability, rather than for performance, that imports are the recommended way to go?

3 Likes

In a non-Meteor project, it leads to big gains thanks to code splitting and tree shaking. In Meteor, let’s wait until at least 1.5 to judge.

3 Likes