increase performance

This commit is contained in:
MuslemRahimi 2024-10-18 11:57:00 +02:00
parent dd1cc6879b
commit 677359ad80

View File

@ -188,7 +188,7 @@
// Reset to original data when 'none' and stop further sorting // Reset to original data when 'none' and stop further sorting
if (sortOrder === "none") { if (sortOrder === "none") {
insiderTradingList = [...originalData]; // Reset to original data (spread to avoid mutation) insiderTradingList = [...originalData]?.slice(0,50); // Reset to original data (spread to avoid mutation)
return; return;
} }
@ -223,7 +223,7 @@
}; };
// Sort using the generic comparison function // Sort using the generic comparison function
insiderTradingList = [...originalData].sort(compareValues); insiderTradingList = [...originalData].sort(compareValues)?.slice(0,50);
}; };
$: { $: {