You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows平台Flutter中CircularProgressIndicator高CPU占用问题求助

Flutter Windows平台CircularProgressIndicator高CPU占用问题求助

我在Windows平台使用Flutter的CircularProgressIndicator()时遇到性能问题,该组件会导致CPU占用大幅上升。在不同硬件环境测试结果如下:

  • Intel(R) Xeon(R) Bronze 3204 CPU @ 1.90GHz:加载3秒时CPU占用达60%
  • Intel(R) Core(TM) i7-9759H CPU @ 2.59GHz:加载3秒时CPU占用为10%

我尝试创建仅包含该进度指示器的空白Flutter应用,Xeon平台上CPU占用有所降低但仍达40%。想问问是否有其他开发者遇到过该问题并知晓解决方法?

示例代码如下:

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text("Demo"),
        ),
        body: Center(
          child: CircularProgressIndicator(),
        ),
      ),
    );
  }
}

补充说明:已添加性能overlay界面和任务管理器截图

Performance overlay
任务管理器截图

内容的提问来源于stack exchange,提问作者mmas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 06:20:01