From bf3a4e36e673423cadfa9a162abda779dc3ea155 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Tue, 23 Sep 2025 17:40:27 -0700 Subject: [PATCH] container: lib_reports: optimize writes by forking - Decreases real time in multicore container environments. * Given the nature of the writer, there should be no race conditions. --- container/src/finance/lib/internal/lib_reports.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/container/src/finance/lib/internal/lib_reports.bash b/container/src/finance/lib/internal/lib_reports.bash index c09573f..91e0258 100644 --- a/container/src/finance/lib/internal/lib_reports.bash +++ b/container/src/finance/lib/internal/lib_reports.bash @@ -342,12 +342,13 @@ function lib_reports::__reports() lib_utils::print_custom " \e[32m├─\e[34m\e[1;3m ${_new_echo}\e[0m\n" - lib_reports::__reports_write \ + (lib_reports::__reports_write \ "$_type" \ "$_new_desc" \ "$_new_base_file" \ - "${_new_opts[@]}" + "${_new_opts[@]}") & done + wait lib_utils::print_custom " \e[32m│\e[0m\n" done