Skip to content

Commit

Permalink
add debounce to updateSearch as it is expensive on big documents
Browse files Browse the repository at this point in the history
  • Loading branch information
blurymind committed Mar 22, 2024
1 parent e372f56 commit 84ff58a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/classes/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ export var App = function(name, version) {
});
};

this.updateSearch = function() {
this.updateSearch = Utils.debounce(function() {
var on = 1;
var off = 0.25;

Expand Down Expand Up @@ -1390,7 +1390,7 @@ export var App = function(name, version) {
element.transition({ opacity: on }, 500);
}
}
};
}, 600);

this.trimBodyLinks = function(body) {
var re = /\[\[(.+?)\|\s*(.+?)\s*\]\]/g;
Expand Down

0 comments on commit 84ff58a

Please sign in to comment.