Skip to content

[Code Quality] Optimize 15 oversized workflows (>100 KB) and investigate size reduction opportunities #12597

@github-actions

Description

@github-actions

Description

Analyze and optimize the 15 workflows that exceed 100 KB in size to determine if they can be modularized or if they represent genuinely complex use cases. The average workflow is 77 KB, so these outliers warrant investigation.

Current Situation

  • Total workflows: 143
  • Average size: 77.35 KB
  • Size range 50-100 KB: 121 workflows (84.6%) - standard
  • Size range >100 KB: 15 workflows (10.5%) - outliers

Top 3 Largest Workflows

  1. copilot-session-insights.lock.yml (119.7 KB)
  2. smoke-claude.lock.yml (112.4 KB)
  3. daily-copilot-token-report.lock.yml (112.4 KB)

Investigation Goals

  1. Determine if size is justified:

    • Comprehensive analysis workflows may legitimately need more complexity
    • Multi-engine smoke tests require extensive setup
    • Token reporting with detailed prompts adds size
  2. Identify optimization opportunities:

    • Duplicate code that could be extracted
    • Inline scripts that could be modularized
    • Repeated configurations that could be centralized
  3. Consider architectural improvements:

    • Could workflows be split into multiple smaller workflows?
    • Can common patterns be extracted to reusable components?
    • Are there opportunities for workflow composition?

Files to Analyze

All 15 workflows >100 KB (exact list available in lockfile statistics analysis)

Suggested Approach

  1. Phase 1: Analyze top 5 largest workflows

    • Document why they're large (complexity vs duplication)
    • Identify specific size contributors
    • Assess modularization opportunities
  2. Phase 2: Create size reduction strategies

    • Extract common patterns to shared libraries
    • Modularize large inline scripts
    • Consider workflow splitting where appropriate
  3. Phase 3: Implement optimizations

    • Apply size reductions where beneficial
    • Document cases where size is justified
    • Update workflow templates to prevent future bloat

Success Criteria

  • All 15 workflows analyzed
  • Size contributors documented for each
  • Justified complexity vs bloat determined
  • Optimization opportunities identified
  • At least 3 workflows optimized if beneficial
  • Size reduction guidelines documented
  • Workflow template best practices updated

Expected Outcomes

  • Reduced maintenance burden for unnecessarily large workflows
  • Clear understanding of complexity requirements
  • Guidelines for preventing future workflow bloat
  • Better performance (smaller workflows compile faster)

Priority

Medium - Code quality improvement, not blocking functionality

Source

Extracted from Lockfile Statistics Analysis #12561 - Size Distribution Analysis

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 12, 2026, 5:15 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions