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

feat: optimization of adapter code #551

Merged
merged 8 commits into from
Jun 16, 2023
Merged

feat: optimization of adapter code #551

merged 8 commits into from
Jun 16, 2023

Conversation

dgarus
Copy link
Contributor

@dgarus dgarus commented Jun 15, 2023

part of #550

This reverts commit c3c871b.
(cherry picked from commit c3c871b)
(cherry picked from commit d3a463a79648c9c8517d6601ad7ac6363f91d07c)
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #551 (e15c72c) into master (f521d6b) will increase coverage by 0.02%.
The diff coverage is 92.18%.

@@             Coverage Diff              @@
##             master     #551      +/-   ##
============================================
+ Coverage     87.71%   87.73%   +0.02%     
+ Complexity      469      466       -3     
============================================
  Files            52       52              
  Lines          1889     1884       -5     
  Branches        167      163       -4     
============================================
- Hits           1657     1653       -4     
+ Misses          192      191       -1     
  Partials         40       40              
Impacted Files Coverage Δ
src/main/java/com/artipie/rpm/RpmMetadata.java 82.82% <80.00%> (+1.19%) ⬆️
...in/java/com/artipie/rpm/meta/MergedXmlPackage.java 94.73% <100.00%> (ø)
...in/java/com/artipie/rpm/meta/MergedXmlPrimary.java 95.08% <100.00%> (-0.31%) ⬇️
src/main/java/com/artipie/rpm/meta/XmlAlter.java 96.15% <100.00%> (-0.08%) ⬇️
src/main/java/com/artipie/rpm/meta/XmlMaid.java 91.11% <100.00%> (ø)
...main/java/com/artipie/rpm/meta/XmlPrimaryMaid.java 90.90% <100.00%> (-0.17%) ⬇️

Copy link
Member

@olenagerasimova olenagerasimova left a comment

Choose a reason for hiding this comment

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

@dgarus one suggestion, please, check

CompletableFuture.runAsync(this.updateOther(packages, res)),
CompletableFuture.runAsync(this.updateFilelist(packages, res))
);
Append.setPrimaryPckg(temp, res, primary).run();
Copy link
Member

Choose a reason for hiding this comment

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

Append.setPrimaryPckg(temp, res, primary).run() can also be run in parallel

Copy link
Contributor Author

@dgarus dgarus Jun 15, 2023

Choose a reason for hiding this comment

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

We also should use this thread.

Copy link
Member

Choose a reason for hiding this comment

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

hm, I see, maybe we change method return type to void? Runnable is not required and seems confusing in such implementation

@olenagerasimova olenagerasimova merged commit fb37f2b into artipie:master Jun 16, 2023
@dgarus dgarus deleted the optimization-1 branch June 16, 2023 07:02
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.

2 participants