Commit 0ded5e5
committed
esm: avoid throw when module specifier is not url
This particular exception is responsible for a lot of overhead when
debugging with large esm codebases with VS Code and break on caught
exceptions is enabled.
VS Code silently suppresses this exception, but the mechanism it uses
to do so is a bit slow so avoiding this common exception can speed up
loading of esm code.
In my scenario this saved over have of the startup run time
(over 20 seconds).
This should also make debugging without suppression of this exception
more pleasant in other tools such as the Chrome dev tools when
attached to NodeJs processes.1 parent 83ba6b1 commit 0ded5e5
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
846 | 847 | | |
847 | 848 | | |
848 | 849 | | |
849 | | - | |
850 | | - | |
851 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
852 | 854 | | |
853 | 855 | | |
854 | | - | |
| 856 | + | |
855 | 857 | | |
856 | 858 | | |
857 | 859 | | |
| |||
0 commit comments