umijs / qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.
https://qiankun.umijs.org
MIT License
15.58k stars 2k forks source link

angular12 开启speedy后,开发模式无效果,生产模式性能恢复正常 #2379

Closed wys0529 closed 1 year ago

wys0529 commented 1 year ago

What happens?

开发模式无效果,生产模式(ng serve --configuration production)性能恢复正常

最小代码库

https://github.com/wys0529/angular12.git

复现情况

  1. 子应用启动开发模式( 开启speedy后,性能无改变 )
  2. 子应用启动生产模式( 开启speedy后,性能恢复正常 )

开发模式CPU一直维持在13%( 生产模式为0.5%浮动 ) image

子应用做如下操作 image 注释 import 'zone.js' image

在子应用路由刷新 会出现zone.js报错后性能回复正常

补充

"development": {
              "buildOptimizer": false,
              "optimization": {
                "scripts": true,
                "styles": false,
                "fonts": false
              },
              "vendorChunk": true,
              "extractLicenses": false,
              "sourceMap": true,
              "namedChunks": true,
              "aot": false
            }

optimization.scripts为false 性能优化就不生效

相关环境信息

DavisGYF commented 1 year ago

你的是子应用还是基座接入的angular啊,我的接入每次更改完以后都会报Cannot GET /angular13/ 必须路由重新 进入http://localhost:7106,端口后面什么也不能跟否则还是报这个错

wys0529 commented 1 year ago

我基座(angular)接入没问题

DavisGYF commented 1 year ago

你基座是自己改装的还是用的他们官方的,能不能加个联系方式,交流下,这今天又更新了qiankun

wudith commented 1 year ago

我们现在angular13工程选择qiankun版本v2.8.0,通过启动子应用时的sandbox 配置开启: { sandbox: { speedy: true } } ,目前生产环境也没有遇到问题。 但开发模式没有测过,一般实际也用不上吧

wys0529 commented 1 year ago

我们现在angular13工程选择qiankun版本v2.8.0,通过启动子应用时的sandbox 配置开启: { sandbox: { speedy: true } } ,目前生产环境也没有遇到问题。 但开发模式没有测过,一般实际也用不上吧

2.8.0刚解决性能问题,后面的2.8.4 2.9.0你可以看下更新内容 , 我是用的2.9.0 默认开启speedy

github-actions[bot] commented 1 year ago

Hello @wys0529. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository.

你好 @wys0529, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。

github-actions[bot] commented 1 year ago

Since the issue was labeled with Need Reproduction, but no response in 30 days. This issue will be close. If you have any questions, you can comment and reply. 由于该 issue 被标记为需要可复现步骤,却 30 天未收到回应。现关闭 issue,若有任何问题,可评论回复。