Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript的一些小问题-GC触发机制 / heap size的优化 / 组件化开发模式的优化 #12

Open
janeLLLL opened this issue Sep 10, 2020 · 0 comments

Comments

@janeLLLL
Copy link
Owner

JavaScript的一些小问题

  1. JavaScript GC触发机制定义:
    • 找出不再使用的变量,然后释放掉其占用内存,但这个过程不是实时的,因为其开销比较大,所以垃圾回收会按照固定的时间间隔周期性地执行。
    • 内存一般指的是存放在堆栈空间的内存引用类型存放位置
    • 当下执行JS的引擎不同,依据不同的算法又存在不同的回收时机,回收空间时就是GC工作时
  2. Memory中heap size的优化实例:
    • vue中响应式数据
      • Obejct.freeze冻结响应式数据
    • 不同的框架有差别
  3. 组件化开发模式如何优化:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant