From d9eee6ef3e051a1027c1aac74c3bac2397ae88b3 Mon Sep 17 00:00:00 2001 From: ConjuringCoffee <72548231+ConjuringCoffee@users.noreply.github.com> Date: Thu, 4 Jan 2024 08:04:31 +0100 Subject: [PATCH] Refresh repository to reduce memory usage in background mode (#6728) --- src/background/zcl_abapgit_background.clas.abap | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/background/zcl_abapgit_background.clas.abap b/src/background/zcl_abapgit_background.clas.abap index bd8c111f3..451021421 100644 --- a/src/background/zcl_abapgit_background.clas.abap +++ b/src/background/zcl_abapgit_background.clas.abap @@ -114,7 +114,7 @@ CLASS zcl_abapgit_background IMPLEMENTATION. TRY. enqueue( ). CATCH zcx_abapgit_exception. - WRITE: / 'Another intance of the program is already running'. + WRITE: / 'Another instance of the program is already running'. RETURN. ENDTRY. @@ -150,6 +150,13 @@ CLASS zcl_abapgit_background IMPLEMENTATION. li_log->add_exception( lx_error ). ENDTRY. + TRY. + " Decrease memory usage for repositories already processed + lo_repo->refresh( abap_true ). + CATCH zcx_abapgit_exception INTO lx_error. + li_log->add_exception( lx_error ). + ENDTRY. + zcl_abapgit_log_viewer=>write_log( li_log ). ENDLOOP.