Improve default trx name (FHCA-3765)
Description
Environment
relates to
Activity
Carlos Ruiz August 25, 2022 at 11:50 AM
Carlos Ruiz August 4, 2022 at 9:23 PM
Hi @Heng Sin Low - due to your concern about performance the FH team did the research and suggested to change the code to use StackWalker instead of Throwable->getStackTrace.
I checked some articles in the internet and it seems that is much better for performance.
For example this article makes a comparison between the methods:
and concludes:
“when there is a strong need to synchronously process stack frames within the caller thread (i.e. business logic depends on it, hence it cannot be decoupled), StackWalker API offers better performance in comparison to Throwable::getStackTrace or Thread::getStackTrace APIs”
The pull request 1427 implements the suggested changes (I tested with WCtxHelpSuggestion.onSave which is one of the few places we still have unassigned displayName).
The feature is still disabled by default, and must be enabled using SysConfig TRX_AUTOSET_DISPLAY_NAME.
Regards,
Carlos Ruiz
Heng Sin Low July 22, 2022 at 1:13 AM
hi @Carlos Ruiz , I’ve added my comments to the PR
Carlos Ruiz July 21, 2022 at 2:21 PM
Hi @Heng Sin Low
I created pull request 1407
I notice that this pull request makes unnecessary a lot of calls to Trx.setDisplayName - when we are setting just class and method name.
There are a few calls that add information, for example in PO where we add the ID to the display name.
Do you think is worthy to remove the unnecessary display name calls - or we simply leave them there?
Regards,
Carlos Ruiz
The default trx name can be improved to show class/method.
Also the list of trx in idempiereMonitor can show also inactive but open trx.