Coder Social home page Coder Social logo

优化Angular应用的性能 about blog HOT 14 OPEN

xufei avatar xufei commented on May 22, 2024 12
优化Angular应用的性能

from blog.

Comments (14)

xufei avatar xufei commented on May 22, 2024

这篇是上周五在IBM交流时候讲的,幻灯片地址在这里

from blog.

rockcoder23 avatar rockcoder23 commented on May 22, 2024

赞民工叔,但是又不打算用那么老圡的方式放个分页条在下面 错别字·老土·把 :)
还有减少手动 $apply次数,应该也能提高性能。

from blog.

hax avatar hax commented on May 22, 2024

“比对两个树形结构是很麻烦的,它的” 后面没了。。。

from blog.

xufei avatar xufei commented on May 22, 2024

@hax 纪晓岚来修好了。。。

from blog.

shanghaikid avatar shanghaikid commented on May 22, 2024

如果你的场景中出现非常多的性能问题,很可能是不适合用这类框架的业务形态。

请问,angular适用哪些业务

from blog.

TedWei avatar TedWei commented on May 22, 2024

又跟民工叔叔学到了。

from blog.

xufei avatar xufei commented on May 22, 2024

@shanghaikid 中小型管控系统的pc端,这类形态是肯定没有问题的,其他的,有的不推荐,有的需要开发者有较高的意识和技能。

from blog.

shenqihui avatar shenqihui commented on May 22, 2024
  1. 降低数据比对的开销
    中的第二个代码出错了。
    get fullName: function() {  // bug

bug 。

from blog.

xufei avatar xufei commented on May 22, 2024

@shenqihui 感谢提醒,已修改

from blog.

yxnino avatar yxnino commented on May 22, 2024

@xufei 有一点不理解,将数据的结构扁平化这一节提到:

我们在界面绑定的时候仍然使用source,而在操作的时候使用dest。

请教一下,template要怎么写可以生成树形结构,谢谢 😄

from blog.

Jason-mor avatar Jason-mor commented on May 22, 2024

疑问:优化的第一点应该是angular1.3.x之后的特性,但是1.3.x之后已经不承诺兼容ie8了。象苏宁的业务肯定要在ie8下面跑的,你们是如何升级这个特性的呢???
优化2:需要根据不同的模型,选择监视的程度。一般不要使用深度监视,性能耗不起
优化3:设值索引,感觉必须要这么做,这是angular 默认提供的一种方式。
优化4:这个在于table 和tree场景,应该都可以使用。
优化5:数据扁平化。肯定需要有个地方处理,最好页面渲染需要使用时候数据已经安要求准备好。

另外还有一些,封装自定义指令的时候尽量减少dom替换,在ie上面效果还是很明显的。

from blog.

dolymood avatar dolymood commented on May 22, 2024

@Jason-mor 之前还有bindonce可用

from blog.

famingjia avatar famingjia commented on May 22, 2024

好像不错

from blog.

Isabelzxy avatar Isabelzxy commented on May 22, 2024

请问PPT怎么只有一页?使用的Chrome最新版本浏览器。

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.