Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PIE-1723] Cache TransactionValidationParams instead of creating new object for each call #1616

Conversation

AbdelStark
Copy link
Contributor

PR description

TransactionValidationParams static methods return a new instance of TransactionValidationParams each time they are called.For example processingBlock() is invoked for each transaction in every block. To avoid creating a lot of instances this PR caches the different possible variants(currently 5) in memory. Once created they are not mutable so there is no risk of race condition

  • cache static methods return values in constant fields
  • don't use Builder internally
  • add tests

Fixed Issue(s)

…object for each call

- cache static methods return values in constant fields
- don't use `Builder` internally
- add tests
@AbdelStark AbdelStark added performance Related to performance testing Related to tesing labels Jun 28, 2019
@AbdelStark AbdelStark merged commit 3030831 into PegaSysEng:master Jun 28, 2019
@AbdelStark AbdelStark deleted the feature/pie-1723-cache-transaction-validation-params branch August 23, 2019 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
performance Related to performance testing Related to tesing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants