Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e88409c
Initial plan
Copilot Dec 9, 2025
7b8e1b7
perf: optimize provider validation and error reporting
Copilot Dec 9, 2025
c76a535
fix: address code review feedback
Copilot Dec 9, 2025
009b742
docs: add performance optimization summary
Copilot Dec 9, 2025
1a82b4e
feat: elaborate optimizations and add benchmark workflow
Copilot Dec 9, 2025
28b2025
fix: address code review feedback
Copilot Dec 9, 2025
a220520
perf: simplify forward reference error reporting
Copilot Dec 9, 2025
914be92
docs: clarify _currentlyCreatingProvider can be Provider or ArgProvider
Copilot Dec 9, 2025
cfe96de
perf: make forward reference detection debug-only
Copilot Dec 9, 2025
66a1e69
docs: document debug-only forward reference detection
Copilot Dec 9, 2025
97e6a82
fix: add explicit type annotations and safety checks
Copilot Dec 9, 2025
63698fd
docs: clarify benchmarks run in debug mode (worst case)
Copilot Dec 9, 2025
0d31179
fix: add pull-requests write permission to benchmark workflow
Copilot Dec 10, 2025
41c2971
fix: prevent duplicate comments and improve benchmark parsing
Copilot Dec 10, 2025
07e28ea
fix: correct benchmark pattern matching
Copilot Dec 10, 2025
0f16c5b
fix: benchmark writes MD directly and fix ternary operator syntax
Copilot Dec 10, 2025
940eaf8
fix: use Provider.withArgument instead of ArgProvider constructor
Copilot Dec 10, 2025
3bfbcfe
refactor: simplify getIndex by removing redundant kDebugMode check
Copilot Dec 10, 2025
2614be9
refactor: make index HashMaps non-nullable for simplicity
Copilot Dec 10, 2025
d17fe0e
refactor: simplify HashMap initialization and remove comment
Copilot Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Provider Benchmarks

on:
pull_request:
paths:
- 'packages/disco/lib/**'
- 'packages/disco/benchmark/**'
- '.github/workflows/benchmark.yaml'
push:
branches:
- main
- dev
paths:
- 'packages/disco/lib/**'
- 'packages/disco/benchmark/**'
workflow_dispatch:

jobs:
benchmark:
name: Run Provider Benchmarks
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2.18.0
with:
channel: "stable"
cache: true

- name: Install dependencies
run: flutter pub get
working-directory: packages/disco

- name: Run benchmarks (Debug Mode - Worst Case)
working-directory: packages/disco
run: |
# Run benchmark in debug mode (default for flutter test)
# The benchmark will generate benchmark_results.md automatically
flutter test benchmark/provider_benchmark.dart

- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: packages/disco/benchmark_results.md

- name: Comment PR with results
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const results = fs.readFileSync('packages/disco/benchmark_results.md', 'utf8');

// Check if we already commented
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});

const botComment = comments.data.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('Provider Benchmark Results')
);

if (botComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: results
});
} else {
// Create new comment
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: results
});
}

- name: Display results
run: cat packages/disco/benchmark_results.md
Loading
Loading