Skip to content

[perf] Make LPT parallel scheduler the default, drop --lpt opt-in flag - #8785

Closed
TomasVotruba wants to merge 2 commits into
mainfrom
lpt-default-scheduler
Closed

TomasVotruba wants to merge 2 commits into
mainfrom
lpt-default-scheduler

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The LPT (Longest Processing Time first) bucket scheduler, previously opt-in behind --lpt, is now the only parallel scheduler.

It splits files into one fixed bucket per worker balanced by total byte size, and keeps each worker alive for its whole bucket, so warm in-memory caches (reflection, parsed AST, scope resolver) survive the run instead of being thrown away on worker recycling.

Changes

  • promote LptScheduleFactory -> Rector\\Parallel\\ScheduleFactory
  • promote ExperimentalParallelFileProcessor -> Rector\\Parallel\\Application\\ParallelFileProcessor
  • move BucketSchedule out of the Experimental namespace
  • remove the old shared-pool ScheduleFactory, ParallelFileProcessor and Schedule value object
  • drop the --lpt CLI option and remove it from the rector and build_scoped_rector workflows

Net -381 lines. The parallel path was smoke-tested with a dry-run over a multi-file directory.

Note: PARALLEL_LPT_POC_NOTES.md at the repo root still documents the old --lpt flag; left untouched here, can be removed in a follow-up.

The LPT (Longest Processing Time first) bucket scheduler is now the only
parallel scheduler. It balances files across workers by size up front and
keeps each worker alive for its whole bucket, preserving warm caches.

- promote LptScheduleFactory to ScheduleFactory
- promote ExperimentalParallelFileProcessor to ParallelFileProcessor
- move BucketSchedule out of the Experimental namespace
- remove the old shared-pool ScheduleFactory, ParallelFileProcessor and Schedule
- drop the --lpt CLI option and its CI usages
@TomasVotruba TomasVotruba changed the title Make LPT parallel scheduler the default, drop --lpt opt-in flag [perf] Make LPT parallel scheduler the default, drop --lpt opt-in flag Oct 23, 2026
- regenerate expected output of the parallel e2e tests for the LPT file
  order (single worker, bucket ordered by file size); the change set is
  identical, only the reporting order differs
- update test comments that referenced the removed mid-run worker respawn
- drop the obsolete ProcessPool nullable ignore; the promoted processor
  uses a non-nullable ProcessPool
@samsonasik

Copy link
Copy Markdown
Member

I already created PR:

for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants