Commit e790eb6
repl: fix cpu overhead pasting big strings to the REPL
Pasting input should not trigger any completions and other
calculations. This is now handled by just writing the string to the
terminal in case the user is pasting. As soon as pasting is done,
the completions will be re-enabled.
Fixes: #40626
Fixes: #43343
PR-URL: #59857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 34dcb7d commit e790eb6Copy full SHA for e790eb6
File tree
Expand file treeCollapse file tree
2 files changed
+42
-0
lines changedOpen diff view settings
Filter options
- lib/internal/readline
- test/parallel
Expand file treeCollapse file tree
2 files changed
+42
-0
lines changedOpen diff view settings
Collapse file
lib/internal/readline/interface.js
Copy file name to clipboardExpand all lines: lib/internal/readline/interface.js+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
624 | 624 | |
625 | 625 | |
626 | 626 | |
| 627 | + |
| 628 | + |
| 629 | + |
| 630 | + |
| 631 | + |
| 632 | + |
627 | 633 | |
628 | 634 | |
629 | 635 | |
|
Collapse file
test/parallel/test-repl-paste-big-data.js
Copy file name to clipboard+36Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
0 commit comments