Commit 5538ffb
committed
sys: Use readdir withFileTypes option to skip lots of stat syscalls
This makes walking large directory trees much more efficient on Node
10.10 or later.
See:
https://lwn.net/Articles/606995/
https://www.python.org/dev/peps/pep-0471/
nodejs/node#22020
https://nodejs.org/en/blog/release/v10.10.0/
Signed-off-by: Anders Kaseorg <andersk@mit.edu>1 parent 69ab1d5 commit 5538ffb
1 file changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
1620 | | - | |
| 1620 | + | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | | - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1624 | 1627 | | |
1625 | 1628 | | |
1626 | 1629 | | |
1627 | 1630 | | |
1628 | 1631 | | |
1629 | | - | |
1630 | 1632 | | |
1631 | 1633 | | |
1632 | | - | |
1633 | | - | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1634 | 1643 | | |
1635 | | - | |
1636 | | - | |
| 1644 | + | |
| 1645 | + | |
1637 | 1646 | | |
1638 | 1647 | | |
1639 | 1648 | | |
| |||
1643 | 1652 | | |
1644 | 1653 | | |
1645 | 1654 | | |
| 1655 | + | |
| 1656 | + | |
1646 | 1657 | | |
1647 | 1658 | | |
1648 | 1659 | | |
| |||
1677 | 1688 | | |
1678 | 1689 | | |
1679 | 1690 | | |
1680 | | - | |
1681 | | - | |
| 1691 | + | |
1682 | 1692 | | |
1683 | 1693 | | |
1684 | 1694 | | |
| |||
0 commit comments