Modify ↓
Ticket #6114 (closed enhancement: duplicate)
fcleanup function perfomance speed up
| Reported by: | vamp | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.2 |
| Component: | event | Version: | 1.4.1 |
| Keywords: | fcleanup | Cc: | vamphouse@… |
| Blocking: | Blocked by: |
Description
return nm.replace(/[\w\s\.\|`]/g, function( ch ) {
return "
" + ch;
});
vs
nm.replace(/(?=[\w\s\.\|`])/g, '
');
Change History
comment:2 Changed 3 years ago by ridgerunner
A fix very similar to this one was recently implemented (See #7062). However, the fix recommended here might be even faster. Only benchmarking can tell...
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

excuse me, "^" character was dropped from initial RegExp: http://gyazo.com/cf062387ab1881de8771199fd5257e2f.png