swiftlang / swiftlang/swift-format

swift-format lint is slower when run with the parallel option

Open
#1,069 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
3k
Forks
290
Avg merge
16h 31m
Merged PRs (30d)
12

Description

time swift-format lint -rp . >/dev/null 2>&1
swift-format lint -rp . > /dev/null 2>&1  175.66s user 0.62s system 1496% cpu 11.782 total

time swift-format lint -r . >/dev/null 2>&1
swift-format lint -r . > /dev/null 2>&1  7.16s user 0.26s system 98% cpu 7.535 total

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two swift-format lint timing commands from the issue and compare their behavior with and without -p. Trace the parallel lint path to identify why it does more work, then verify that parallel lint is no slower than the non-parallel command on the reported example.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
performance, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.