Hybrid View
-
29 Jan 2013 3:24 AM #1
form.Basic.load() very slow in big forms due to setValues()
form.Basic.load() very slow in big forms due to setValues()
ExtJS version tested: 4.1.1
Browsers tested: Firefox 18.0.1, Chrome 24.0.1312.56 on MacOS
Related to:
http://www.sencha.com/forum/showthread.php?234813
Description:
When having a form with say 30 or more fields and calling form.Basic.load() to fill it with data, the time it takes for the setValues() call in form.action.Load.onSuccess() is several seconds. My findings regarding the number of calls matches those of user Daniil detailed in the linked post above. And like in the linked post, doing Ext.suspendLayouts() and Ext.resumeLayouts() solves the problem.
The "bug", in my view, is that Ext.suspendLayouts() and Ext.resumeLayouts() is not used in form.action.Load.onSuccess() or maybe even better in form.Basic.setValues() to avoid this performance issue by default without the developer having to take care of it.
-
29 Jan 2013 3:40 AM #2
The current code already does this, setValues is wrapped in a suspend call. IIRC it was done in 4.1.2.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote