This repository was archived by the owner on Sep 21, 2021. It is now read-only.
Commit bb31728
committed
Speed up containsURL function.
The function was splitting up a string and testing if each parts was an actual URL,
until one was encountered.
The split function was showing up in some profile I did today (nothing too big, but
bigger that it should be).
Here switching to a simple regex test works and is faster to run.1 parent e574458 commit bb31728
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | | - | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
0 commit comments