Skip to content

PR#16 compiles extremely slowly in the Windows MSVC environment #17

@FrozenLemonTee

Description

@FrozenLemonTee

问题描述

mcpplibs/primitives 的 PR #16feat-explicit-conversion)中,Windows CI 明显慢于 Linux/macOS,且测试目标构建阶段出现超时/取消。

影响

观测到的现象

GitHub Actions(PR #16

  • 运行 23537726928
  • build-windows 约 20 分钟后 cancelled
  • build-linux ~1 分钟失败
  • build-macos ~2 分钟成功
  • 运行 23540994438
  • build-windows 约 30 分钟后 cancelled
  • build-linux ~2 分钟成功
  • build-macos ~2 分钟成功
  • Windows 慢点集中在 primitives_test 构建阶段(Build and test step)

可能原因(待确认)

  1. PR Enhance type classification and simplify numeric conversion functions #16 的 Windows CI 脚本调整导致吞吐下降:
  • 并行度改为固定 -j2
  • 分阶段构建多个目标(core/test/example)
  1. 新增 conversion 模块与测试提升了模板/模块编译负载。

复现步骤

GitHub Actions 复现

  1. 打开 PR Enhance type classification and simplify numeric conversion functions #16
  2. 触发 CI(或查看最近两次运行)。
  3. 观察 Windows job 在 Build and test 阶段长时间运行后 cancelled。

期望行为

  • Windows CI 的 primitives_test 能在超时前稳定完成。
  • conversion 测试开/关应能在同一 Windows CI 环境下进行可比的耗时评估。

建议的下一步

  1. 在 Windows job 暂时恢复更高并行度(如 $env:NUMBER_OF_PROCESSORS),并减少重复分段构建。
  2. 在 Windows CI 中做 A/B:
  • A: conversion tests enabled
  • B: conversion tests disabled
    比较 Windows primitives_test 纯构建耗时与总 job 耗时。

相关信息

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions