angular-elastic
angular-elastic copied to clipboard
Performance Improvement
Our customers see performance lags when typing very fast. I debugged the elastic code and saw that every key stroke fires the adjust-function 2 times! One time called by the model-watcher and second time by the "oninput"-event of the textarea.
To improve the performance I buffered the function-call of adjust:
var bufferedAdjust = null;
function adjust() {
if( !bufferedAdjust ) {
bufferedAdjust = $timeout(_adjust, 100);
bufferedAdjust.then(function () {
bufferedAdjust = null
});
}
}
function _adjust() {
// here is the original adjust-function-code
...
to investigate
Any updates on this please?
We also experience performance issues when the user enters a lot of text and then types fast. The profiler points out that the adjust function takes long because of "getPropertyValue" which I suppose means reading styles values from the DOM. Is there a way to bypass that?
Archiving repository.