분류 javascript

JavaScript 성능 향상을 위한 12 가지 팁

컨텐츠 정보

  • 조회 202 (작성일 )

본문

웹 페이지 또는 앱을 만들 때 가장 중요한 측면 중 하나는 성능입니다.


출처 : https://nodesource.com/blog/improve-javascript-performance


1. Cache in the browser

2. Define the execution context

3. Remove unused JavaScript

4. Avoid using too much memory

5. Defer the load of JavaScript that is not necessary:

6. Avoid memory leaks

7. Use web workers when you need to execute code that needs a lot of execution time

8. If you access a DOM item several times, save it in a local variable

9. Prioritize access to local variables

10. Avoid using global variables

11. Implement the optimizations that you would apply in any other programming language

12. Use tools to detect problems


Screen Shot 2019-07-03 at 6.36.55 PM