From 69265a2d3e2e9d2325737843b221b49c7a8e4f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 21 Nov 2025 16:09:28 +0100 Subject: [PATCH] Replace jQuery's hide and show by our own implementation jQuery's implementation triggers forced reflows and style recomputation which hinders performances. Given that we only care about the node on which the call is done we can use a simpler and more efficient implementation. Closes #14330 --- sao/src/common.js | 16 +++++----- sao/src/sao.js | 33 ++++++++++++++++++-- sao/src/screen.js | 22 ++++++------- sao/src/session.js | 8 ++--- sao/src/tab.js | 2 +- sao/src/view/form.js | 74 ++++++++++++++++++++++---------------------- sao/src/view/tree.js | 72 +++++++++++++++++++++--------------------- sao/src/window.js | 4 +-- 8 files changed, 129 insertions(+), 102 deletions(-) diff --git a/sao/src/common.js b/sao/src/common.js index 6d32b10bca..cc1f3092cd 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -1014,9 +1014,9 @@ states = {'invisible': true}; } if (states.invisible) { - this.el.hide(); + this.el.sao_hide(); } else { - this.el.show(); + this.el.sao_show(); } this.el.prop('disabled', Boolean(states.readonly)); this.set_icon(states.icon || this.attributes.icon); @@ -3746,7 +3746,7 @@ 'text': '.', })); } - this.el.hide(); + this.el.sao_hide(); jQuery(() => { this.el.appendTo('body'); }); @@ -3757,7 +3757,7 @@ } return window.setTimeout(() => { this.queries += 1; - this.el.show(); + this.el.sao_show(); }, timeout); }, hide: function(timeoutID) { @@ -3767,7 +3767,7 @@ } if (this.queries <= 0) { this.queries = 0; - this.el.hide(); + this.el.sao_hide(); } } }); @@ -3821,7 +3821,7 @@ }).append(jQuery('