Commit dc5090e
committed
fix(perf): Fix event listeners/ DOM nodes memory leak and throttle resize events
Includes: - Unbind 'resize' event handlers on $destroy (as per issue 720kb#143). Not only this reduces the overall number of listeners being bound, but also allows DOM nodes to be GC'ed. - To alleviate some CPU churn, we now throttle the resize event handler. By doing so, we enable users to resize their browsers in a much smoother fashion.1 parent fa1aa17 commit dc5090e
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
767 | 776 | | |
768 | 777 | | |
769 | 778 | | |
| 779 | + | |
770 | 780 | | |
771 | 781 | | |
772 | 782 | | |
| |||
0 commit comments