Skip to content

Commit 33ad978

Browse files
committed
[WebInterface] fix profiles config latency
1 parent 757788f commit 33ad978

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Services/Interfaces/web_interface/static/js/components/configuration.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ function updated_validated_updated_global_config(updated_data){
720720
}
721721

722722
function fetch_currencies(){
723+
const maxDisplayedOptions = 2000; // display only the first 2000 options to avoid select performance issues
723724
const getCurrencyOption = (addCurrencySelect, details) => {
724725
return new Option(`${details.n} - ${details.s}`, details.i, false, false);
725726
}
@@ -732,7 +733,7 @@ function fetch_currencies(){
732733
success: function (data) {
733734
const addCurrencySelect = $("#AddCurrencySelect");
734735
const options = [];
735-
data.forEach((element) => {
736+
data.slice(0, maxDisplayedOptions).forEach((element) => {
736737
if(!currencyDetailsById.hasOwnProperty(element.i)){
737738
currencyDetailsById[element.i] = element
738739
}

0 commit comments

Comments
 (0)