Updates for ace performance related to new searchinfiles work
This commit is contained in:
parent
c4cb541414
commit
69c8f6615d
3 changed files with 20 additions and 3 deletions
|
|
@ -327,8 +327,13 @@ var Document = function(text) {
|
|||
return {row: row, column: 0};
|
||||
|
||||
var args = [row, 0];
|
||||
args.push.apply(args, lines);
|
||||
var step = 100000;
|
||||
var l = Math.ceil(lines.length / step);
|
||||
for (var tlines, i = 0; i < l; i++) {
|
||||
tlines = lines.slice(i * step, step);
|
||||
args.push.apply(args, tlines);
|
||||
this.$lines.splice.apply(this.$lines, args);
|
||||
}
|
||||
|
||||
var range = new Range(row, 0, row + lines.length, 0);
|
||||
var delta = {
|
||||
|
|
|
|||
|
|
@ -748,7 +748,14 @@ function Folding() {
|
|||
} else {
|
||||
var args = Array(len + 1);
|
||||
args.unshift(firstRow, 1);
|
||||
this.foldWidgets.splice.apply(this.foldWidgets, args);
|
||||
|
||||
var step = 100000;
|
||||
var l = Math.ceil(args.length / step);
|
||||
for (var targs, i = 0; i < l; i++) {
|
||||
targs = args.slice(i * step, step);
|
||||
this.foldWidgets.splice.apply(this.foldWidgets, targs);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,12 @@ var sender;
|
|||
onmessage = function(e) {
|
||||
var msg = e.data;
|
||||
if (msg.command) {
|
||||
main[msg.command].apply(main, msg.args);
|
||||
var step = 100000;
|
||||
var l = Math.ceil(msg.args.length / step);
|
||||
for (var targs, i = 0; i < l; i++) {
|
||||
targs = msg.args.slice(i * step, step);
|
||||
main[msg.command].apply(main, targs);
|
||||
}
|
||||
}
|
||||
else if (msg.init) {
|
||||
initBaseUrls(msg.tlns);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue