有多少种方法可以提高角度性能? [英] How many ways are there to increase the performance in angular?

查看:80
本文介绍了有多少种方法可以提高角度性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名有经验的前端开发人员,并且是测试运行时性能的新手.

I am an angular front end developer and I am new for testing the run time performance.

为了检查性能,我下载了Google插件" Performance-Analyser ".而且我得到了如下的表演时间.

For checking the performance I downloaded the google plugin, "Performance-Analyser". And I got the performance time as below.

对于DOM处理本身,需要5.4秒.

For DOM processing itself, its taking 5.4 Secs.

(对于我们的项目,我们使用的是角度6.)

任何人都可以说出一些提高性能的提示.还请给我一些链接?

Can anybody tell some tips for increasing the performance. Also please some links for me??

有人可以帮助我吗?

推荐答案

有些操作可以优化您的应用程序,例如:

there is some actions that can optimize your application like:

  1. 构建优化 https://github. com/angular/angular-cli/tree/master/packages/angular_devkit/build_optimizer

使用延迟加载的模块

保留空白以删除所有空白

Preserve Whitespaces to remove all white spaces

"angularCompilerOptions":{ "preserveWhitespaces":false }

"angularCompilerOptions": { "preserveWhitespaces": false }

您可以升级到更新版本的angular并使用 Ivy Render Engine (常春藤渲染引擎)

you can upgrade to newer version of angular and use Ivy Render Engine more details

服务器端渲染:在服务器上渲染应用程序的首页可以提高性能,速度和加载时间

Server-side rendering: Rendering the first page of your application on the server can boost performance, speed and load time

您可以使用 webpack捆绑软件分析器进行性能分析,以删除捆绑软件链接此处

you can use webpack Bundle Analyzer for performance analysis to remove unused items in your bundle link here

这篇关于有多少种方法可以提高角度性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆