PDA

View Full Version : [FIXED-EXTJSIV-158] Dynamic Form, Grid and Charts example stall 1+ second



SebTardif
17 Mar 2011, 5:37 AM
If you edit a number in the form, like putting 50, then do backspace, it's freezing for at least 1 second on a quad core. Looks like there is too much looping and no "idle" time left for user action.

See http://dev.sencha.com/deploy/ext-4.0-pr4/examples/charts/FormDashboard.html

Jamie Avins
17 Mar 2011, 4:21 PM
It's currently designed that way (though I'd prefer a smaller buffer):



createListeners = function() {
var timer = null;
return {
change: function(field, newValue, oldValue, listener) {
var name, series;
if (selectingRow) return;
clearTimeout(timer);
timer = setTimeout(function() {
form.updateRecord(rec);
updateRecord(rec);
}, 1000);
}
};
};


I'm going to clean this up a bit and lower the delay.



createListeners = function() {
return {
change: function(field, newValue, oldValue, listener) {
if (selectingRow) {
return;
}
form.updateRecord(rec);
updateRecord(rec);
},
buffer: 250
};
};