-
Notifications
You must be signed in to change notification settings - Fork 98
feat: enable skipCloneValue on leoric #924
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
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
Co-authored-by: fengmk2 <[email protected]>
| ...database, | ||
| database: database.name ?? 'cnpmcore', | ||
| charset: 'utf8mb4', | ||
| skipCloneValue: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot 添加注释备忘,让后续的维护者知道为什么会开启这个配置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加注释说明,包含 PR 链接和中英文说明。详见 commit 4780cd1
config/config.unittest.ts
Outdated
|
|
||
| config.orm = { | ||
| database: database.name ?? 'cnpmcore_unittest', | ||
| skipCloneValue: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot 这里不需要添加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已在 commit f5e310d 中移除
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #924 +/- ##
==========================================
- Coverage 95.37% 95.26% -0.12%
==========================================
Files 197 197
Lines 22136 22139 +3
Branches 2442 2429 -13
==========================================
- Hits 21113 21091 -22
- Misses 1023 1048 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: fengmk2 <[email protected]>
Removed skipCloneValue from ORM configuration. Signed-off-by: MK (fengmk2) <[email protected]>
Removed commented Chinese text for clarity. Signed-off-by: MK (fengmk2) <[email protected]>
|
🎉 This PR is included in version 4.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Enable skipCloneValue on Leoric
Based on Leoric PR #446 (feat: options.skipCloneValue), this feature improves performance by skipping the cloning of database values for change tracking.
Changes Made:
skipCloneValue: trueto the ORM configuration inconfig/config.default.tswith explanatory comments (including PR reference and bilingual explanation)Why This Change:
This optimization reduces memory overhead by avoiding unnecessary cloning of database values. By default, Leoric clones values to track model changes, but with
skipCloneValue: true, the same object reference is used, improving performance in high-throughput scenarios.The configuration includes comments explaining:
Security Summary: