deftjs / DeftJS

Extensions for Large-Scale Sencha Touch and Ext JS Applications
http://deftjs.org/
MIT License
285 stars 56 forks source link

Prevent unnecessary cloning of config objects. #135

Closed bentrm closed 3 years ago

bentrm commented 9 years ago

I was having problems with "Maximum call stack size exceeded." errors when initializing components whose config properties may reference larger objects. For some reason those objects would get cloned instead of just referenced. I think the reason is the usage of Ext.Object.merge as shown in this PR merging this.injectConfig and this.config onto a whole new object. Errors are gone now.

I tried to check this PR via Travis but was unable to get the test suite running.

bentrm commented 9 years ago

I think the usage of Ext.apply is even a bit nicer than Ext.Object.merge so I did an amend of my PR. Applying a null value will have no affect, so @injectConfig or {} is not necessary.

brian428 commented 9 years ago

Even though merge() works differently than apply(), I don't think it would have negative consequences here. That said, do you have any idea what's causing the Travis build to fail on your pull request?

bentrm commented 9 years ago

I think the build process is not working right now. Looks like multiple incompatibilities of npm packages. #132 seems to be affected by this as well.