Commit d205f3a
add node fiber to improve performance (#2319)
For issue [#2223](#2223), in order to solve the slow compilation time that is caused by changing from node-sass to dart-sass, one possible solution is to add a node-fibers package. Pulling from the sass official website, "to avoid this performance hit, render() can use the fibers package to call asynchronous importers from the synchronous code path". And i have validated the performance improvement: the first compilation changed to 76s from the previous 409s.
However, node-fiber package has reached end of life with Node 16. If the performance issue is a problem, we can consider stay on Node 14 and use node-fiber for now, and remove fibers when migrating to Node 16 later.
Issue resolved:
#2223
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: Sergey V. Osipov <sipopo@yandex.ru>1 parent fb86e42 commit d205f3a
File tree
3 files changed
+18
-4
lines changed- packages/osd-optimizer
- src/worker
3 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7025 | 7025 | | |
7026 | 7026 | | |
7027 | 7027 | | |
| 7028 | + | |
| 7029 | + | |
| 7030 | + | |
| 7031 | + | |
| 7032 | + | |
7028 | 7033 | | |
7029 | 7034 | | |
7030 | 7035 | | |
| |||
8406 | 8411 | | |
8407 | 8412 | | |
8408 | 8413 | | |
| 8414 | + | |
| 8415 | + | |
| 8416 | + | |
| 8417 | + | |
| 8418 | + | |
| 8419 | + | |
| 8420 | + | |
8409 | 8421 | | |
8410 | 8422 | | |
8411 | 8423 | | |
| |||
14306 | 14318 | | |
14307 | 14319 | | |
14308 | 14320 | | |
14309 | | - | |
14310 | | - | |
14311 | | - | |
| 14321 | + | |
| 14322 | + | |
| 14323 | + | |
14312 | 14324 | | |
14313 | 14325 | | |
14314 | 14326 | | |
| |||
0 commit comments