-
-
Notifications
You must be signed in to change notification settings - Fork 130
⚡️ perf(biliass): improve biliass performance #547
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
…better performance
…ngle string instead of a vector
…timize performance
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR optimizes the biliass performance by replacing the cached crate with a custom cache implementation and applying various micro-optimizations throughout the codebase.
- Implements a custom
ZoomFactorCacheusingFxHashMapandOnceLockto replace thecachedproc macro - Optimizes string handling in XML parsing by using direct string concatenation instead of collecting vectors
- Applies performance optimizations including inlining, parallel filtering, and unstable sorting
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/biliass/rust/src/writer/utils.rs | Replaces cached proc macro with custom zoom factor cache implementation |
| packages/biliass/rust/src/reader/xml.rs | Optimizes string concatenation in comment content parsing |
| packages/biliass/rust/src/reader/utils.rs | Adds inline attribute to unescape_newline function |
| packages/biliass/rust/src/filter.rs | Optimizes position matching with direct pattern matching and inline attribute |
| packages/biliass/rust/src/convert.rs | Multiple optimizations including parallel filtering, unstable sorting, and string handling |
| packages/biliass/rust/Cargo.toml | Updates dependencies and compiler optimization settings |
CodSpeed Performance ReportMerging #547 will improve performances by 24.91%Comparing Summary
Benchmarks breakdown
|
动机
利用 copilot 优化 biliass 性能
解决方案
交给 @copilot
类型