Improve default trx name (FHCA-3765)

Description

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.

Environment

None

Activity

Carlos Ruiz 
August 4, 2022 at 9:23 PM

Hi - 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:

https://ionutbalosin.com/2018/06/an-even-faster-way-than-stackwalker-api-for-asynchronously-processing-the-stack-frames/

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 , I’ve added my comments to the PR

Carlos Ruiz 
July 21, 2022 at 2:21 PM

Hi

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

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created July 19, 2022 at 3:52 PM
Updated October 1, 2022 at 7:25 AM
Resolved August 5, 2022 at 11:43 AM