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

Improve perfomance #46

Merged
merged 22 commits into from Sep 26, 2023
Merged

Improve perfomance #46

merged 22 commits into from Sep 26, 2023

Conversation

arogachev
Copy link
Contributor

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

@arogachev arogachev mentioned this pull request Sep 20, 2023
3 tasks
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1a805a7) 99.42% compared to head (00395e6) 96.18%.
Report is 1 commits behind head on master.

❗ Current head 00395e6 differs from pull request most recent head 6db6f55. Consider uploading reports for the commit 6db6f55 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #46      +/-   ##
============================================
- Coverage     99.42%   96.18%   -3.24%     
- Complexity      123      149      +26     
============================================
  Files             9        7       -2     
  Lines           518      656     +138     
============================================
+ Hits            515      631     +116     
- Misses            3       25      +22     
Files Coverage Δ
src/DbSchemaManager.php 100.00% <100.00%> (ø)
src/ItemTreeTraversal/CteItemTreeTraversal.php 100.00% <100.00%> (ø)
src/ItemTreeTraversal/MysqlItemTreeTraversal.php 100.00% <100.00%> (ø)
src/ItemsStorage.php 100.00% <100.00%> (ø)
src/TransactionalManagerDecorator.php 100.00% <100.00%> (+4.54%) ⬆️
src/AssignmentsStorage.php 77.27% <95.23%> (-22.73%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arogachev arogachev self-assigned this Sep 20, 2023
@arogachev arogachev added the type:task Task label Sep 20, 2023
@what-the-diff
Copy link

what-the-diff bot commented Sep 20, 2023

PR Summary

  • Enhanced CHANGELOG.md File
    An essential file keeping track of project version history has been updated, providing clearer and updated project information.
  • Updated Dependency yiisoft/rbac
    The version of a key component, yiisoft/rbac, has been changed, which could result in improved performance and/or additional features.
  • Refactored Methods in AssignmentsStorage.php
    The getByUserId and getByItemNames methods have been tweaked for a better flow.
  • New Methods in ItemTreeTraversalInterface.php
    New methods named getChildPermissionRows, getChildRoleRows, and hasChild have been added to improve versatility and extend existing functionality.
  • Refactored getParentRows and getChildrenRows Methods
    The logic of these methods is more streamlined, which should result in improved efficiency.
  • More Methods in MysqlItemTreeTraversal.php File
    Additional methods like getRowsStatement, getAllChildPermissions, getAllChildRoles, and hasChild have been added, further extending the utility of this module.
  • Refactored Methods in ItemsStorage.php
    The exists and roleExists methods have been revamped with better readability and enhanced operation.
  • Updated assign Method in TransactionalManagerDecorator.php
    The assign method now includes a createdAt parameter making the system more informative.
  • Adjusted Unit Tests
    Various test methods have been updated for more accurate testing.
  • Removed and Marked Certain Tests as Skipped
    The testRemoveChild method is no longer active for now; it's marked as skipped, indicating a temporary deactivation.

@arogachev arogachev requested a review from a team September 22, 2023 08:36
@arogachev arogachev added the status:code review The pull request needs review. label Sep 22, 2023
@arogachev arogachev marked this pull request as ready for review September 22, 2023 08:36
Copy link
Member

@Tigrov Tigrov left a comment

Choose a reason for hiding this comment

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

It is better not to use ->getRawSql(). And suggested little improvements.

src/AssignmentsStorage.php Show resolved Hide resolved
src/ItemTreeTraversal/CteItemTreeTraversal.php Outdated Show resolved Hide resolved
src/ItemsStorage.php Show resolved Hide resolved
src/ItemsStorage.php Show resolved Hide resolved
src/ItemTreeTraversal/MysqlItemTreeTraversal.php Outdated Show resolved Hide resolved
src/ItemTreeTraversal/MysqlItemTreeTraversal.php Outdated Show resolved Hide resolved
Copy link
Member

@Tigrov Tigrov left a comment

Choose a reason for hiding this comment

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

👍

@arogachev arogachev merged commit ba8373a into master Sep 26, 2023
2 checks passed
@arogachev arogachev deleted the improve-perfomance branch September 26, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review. type:task Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants