ng-include will create a new area and register the clock (in the path expression used by ng-include ) in the area where ng-include . Although this requires some additional processing, these are still JavaScript objects based and, as such, very fast. The effect of the new watch plus the additional volume in most cases should be completely negligible.
The only real difference that I see is that ng-include will include / render your partial asynchronously, so you can see a little delay, especially when getting partial data over the network (but this can be mitigated by preloads as described here: https://stackoverflow.com/a/318512/
In short: in most cases, the effect of ng-include should be negligible if partial files are preloaded .
One last comment: "premature optimization is the root of all evil." Do not start tuning micr-performance until you determine the performance of your application and determine that ng-include is the bottleneck.
pkozlowski.opensource
source share