Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel payment request generation #1878

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Parallel payment request generation #1878

merged 1 commit into from
Jul 16, 2021

Conversation

pm47
Copy link
Member

@pm47 pm47 commented Jul 16, 2021

Delegate the payment request generation, signature and db write to a short-lived child actor.

There is small (~5%) gain in performance in PerformanceIntegrationSpec because what matters is the db write, and it is not parallelized in WAL mode.

@pm47 pm47 requested a review from t-bast July 16, 2021 08:32
@codecov-commenter
Copy link

Codecov Report

Merging #1878 (5788300) into master (ca51a2d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1878      +/-   ##
==========================================
+ Coverage   87.27%   87.29%   +0.02%     
==========================================
  Files         159      159              
  Lines       11943    11948       +5     
  Branches      471      492      +21     
==========================================
+ Hits        10423    10430       +7     
+ Misses       1520     1518       -2     
Impacted Files Coverage Δ
...r-core/src/main/scala/fr/acinq/eclair/Eclair.scala 51.04% <100.00%> (ø)
...cinq/eclair/payment/receive/MultiPartHandler.scala 95.00% <100.00%> (+0.21%) ⬆️
...main/scala/fr/acinq/eclair/io/PeerConnection.scala 84.16% <0.00%> (-0.42%) ⬇️
...c/main/scala/fr/acinq/eclair/channel/Channel.scala 86.29% <0.00%> (+0.08%) ⬆️
...clair/channel/publish/ReplaceableTxPublisher.scala 86.98% <0.00%> (+1.18%) ⬆️

case Failure(exception) => ctx.sender ! Status.Failure(exception)
}
case receivePayment: ReceivePayment =>
val child = ctx.spawn(CreateInvoiceActor(nodeParams), name = UUID.randomUUID().toString)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you don't need to specify a name, you can use spawnAnonymous

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix in a subsequent related PR.

@pm47 pm47 merged commit 3bb7ee8 into master Jul 16, 2021
@pm47 pm47 deleted the parallel-payment-request branch July 16, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants