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: ParagraphCache alternative #996

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Conversation

marc2332
Copy link
Owner

@marc2332 marc2332 commented Nov 17, 2024

Depends on #850

@marc2332 marc2332 added enhancement 🔥 New feature or request experiment 🧪 performance ⚡️ Performance improvement ⚡️ labels Nov 17, 2024
@marc2332 marc2332 changed the title feat: Force SVG root element to have the specified size feat: ParagraphCache alternative Nov 17, 2024
Copy link

Benchmark for 1443378

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 104.5±0.78ms 103.6±0.71ms -0.86%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 25.3±0.88ms 25.1±1.25ms -0.79%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1378.2±10.75µs 1393.9±20.26µs +1.14%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 134.1±2.02µs 132.8±2.01µs -0.97%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 24.2±0.68ms 24.6±0.98ms +1.65%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1697.2±42.87µs 1729.4±64.19µs +1.90%
benchmarks/size=19531 depth=7 wide=5 mode=cached 323.9±15.38µs 320.7±12.99µs -0.99%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.05ms 2.6±0.05ms 0.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 409.1±87.88µs 408.9±78.79µs -0.05%
benchmarks/size=54241 depth=5 wide=15 mode=cached 260.2±34.29µs 265.2±33.64µs +1.92%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.3±0.32ms 6.3±0.23ms 0.00%

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 38 lines in your changes missing coverage. Please review.

Project coverage is 74.21%. Comparing base (2991c5a) to head (ac00f4b).

Files with missing lines Patch % Lines
crates/core/src/elements/utils.rs 0.00% 6 Missing ⚠️
crates/core/src/render/paragraph_cache.rs 87.23% 6 Missing ⚠️
crates/renderer/src/config.rs 0.00% 5 Missing ⚠️
crates/core/src/elements/paragraph.rs 63.63% 4 Missing ⚠️
crates/core/src/render/utils/paragraph.rs 93.54% 4 Missing ⚠️
crates/core/src/elements/label.rs 50.00% 3 Missing ⚠️
crates/core/src/render/utils/label.rs 95.23% 2 Missing ⚠️
crates/renderer/src/app.rs 0.00% 2 Missing ⚠️
crates/core/src/elements/image.rs 0.00% 1 Missing ⚠️
crates/core/src/elements/rect.rs 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
+ Coverage   74.17%   74.21%   +0.04%     
==========================================
  Files         215      216       +1     
  Lines       24542    24684     +142     
==========================================
+ Hits        18203    18319     +116     
- Misses       6339     6365      +26     

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


🚨 Try these New Features:

Copy link

Benchmark for a731e08

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 106.3±0.92ms 107.3±1.30ms +0.94%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 27.3±0.91ms 27.9±1.72ms +2.20%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1391.6±75.00µs 1420.8±59.45µs +2.10%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 132.7±3.57µs 132.7±1.58µs 0.00%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 26.3±0.80ms 25.7±0.77ms -2.28%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1719.0±46.75µs 1786.6±154.01µs +3.93%
benchmarks/size=19531 depth=7 wide=5 mode=cached 332.6±14.71µs 379.1±31.06µs +13.98%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.08ms 2.8±0.18ms +7.69%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 407.9±56.92µs 410.9±81.66µs +0.74%
benchmarks/size=54241 depth=5 wide=15 mode=cached 288.8±46.72µs 386.0±88.27µs +33.66%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.4±0.27ms 6.5±0.42ms +1.56%

Copy link

Benchmark for e0e6d6f

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 103.0±0.43ms 102.4±0.67ms -0.58%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 24.4±0.76ms 24.8±0.92ms +1.64%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1353.8±25.17µs 1354.5±17.06µs +0.05%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 131.2±1.45µs 131.6±1.54µs +0.30%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 24.4±0.49ms 24.1±0.46ms -1.23%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1688.9±7.70µs 1681.6±13.03µs -0.43%
benchmarks/size=19531 depth=7 wide=5 mode=cached 311.7±6.35µs 311.6±6.07µs -0.03%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.05ms 2.6±0.02ms 0.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 409.2±108.23µs 409.2±133.66µs 0.00%
benchmarks/size=54241 depth=5 wide=15 mode=cached 248.3±13.58µs 250.3±11.57µs +0.81%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.2±0.09ms 6.3±0.15ms +1.61%

Copy link

Benchmark for 33fd35e

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 103.3±0.87ms 102.5±0.50ms -0.77%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 23.3±0.51ms 25.1±1.55ms +7.73%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1358.5±17.08µs 1347.5±16.03µs -0.81%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 133.1±2.23µs 132.8±6.63µs -0.23%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 23.1±0.54ms 23.1±0.26ms 0.00%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1709.0±113.61µs 1653.2±29.86µs -3.27%
benchmarks/size=19531 depth=7 wide=5 mode=cached 306.5±4.14µs 305.8±4.17µs -0.23%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.24ms 2.6±0.01ms 0.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 408.4±62.40µs 410.3±149.34µs +0.47%
benchmarks/size=54241 depth=5 wide=15 mode=cached 241.3±9.45µs 240.3±10.16µs -0.41%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.1±0.09ms 6.2±0.08ms +1.64%

Base automatically changed from feat/force-svg-root-element-to-have-specified-size to main November 20, 2024 16:57
Copy link

Benchmark for 7b3dec1

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 105.4±0.67ms 104.4±0.79ms -0.95%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 26.3±1.15ms 26.9±1.01ms +2.28%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1382.4±24.10µs 1373.4±17.06µs -0.65%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 132.5±1.37µs 132.6±5.90µs +0.08%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 25.2±0.64ms 26.3±0.86ms +4.37%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1794.1±114.47µs 1745.3±71.95µs -2.72%
benchmarks/size=19531 depth=7 wide=5 mode=cached 327.9±21.87µs 331.2±21.61µs +1.01%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.08ms 2.7±0.14ms +3.85%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 412.0±116.55µs 414.5±134.44µs +0.61%
benchmarks/size=54241 depth=5 wide=15 mode=cached 341.5±82.84µs 311.7±65.92µs -8.73%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.5±0.39ms 6.5±0.46ms 0.00%

Copy link

Benchmark for 8175505

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 99.9±2.05ms 100.6±2.17ms +0.70%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 22.1±0.49ms 22.5±0.87ms +1.81%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1337.3±39.14µs 1304.5±38.42µs -2.45%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 127.3±4.14µs 127.5±3.68µs +0.16%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 22.5±0.46ms 23.1±0.36ms +2.67%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1650.9±51.89µs 1644.3±50.49µs -0.40%
benchmarks/size=19531 depth=7 wide=5 mode=cached 300.0±7.83µs 299.0±7.97µs -0.33%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.5±0.06ms 2.5±0.11ms 0.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 398.9±130.22µs 408.2±133.39µs +2.33%
benchmarks/size=54241 depth=5 wide=15 mode=cached 234.5±11.69µs 239.5±8.61µs +2.13%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.0±0.25ms 6.2±0.16ms +3.33%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request experiment 🧪 performance ⚡️ Performance improvement ⚡️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant