deno icon indicating copy to clipboard operation
deno copied to clipboard

refactor(cli,ext,ops): cleanup `regex` with `lazy-regex`

Open attila-lin opened this issue 3 years ago • 2 comments

  • bump deps: the newest lazy-regex need newer oncecell and regex(not sure if it matters?)
  • reduce unwarp
  • remove dep lazy_static
  • make more regex cached

attila-lin avatar Jan 07 '23 08:01 attila-lin

@attila-lin could you port this macro so we don't have to pull the whole dependency?

bartlomieju avatar Jan 29 '23 12:01 bartlomieju

Yes of course

attila-lin avatar Jan 29 '23 12:01 attila-lin

@attila-lin, I'm still interested in landing this PR, seems like a good change. Any chance you could rebase it?

bartlomieju avatar Mar 13 '23 13:03 bartlomieju

Be busy last month😅. Working on this today~

attila-lin avatar Mar 14 '23 01:03 attila-lin

@attila-lin, I'm still interested in landing this PR, seems like a good change. Any chance you could rebase it?

hi, I did the rebase.

attila-lin avatar Mar 16 '23 02:03 attila-lin

Thanks for looking into this @attila-lin. From what I can see in changed lines it feels like all of these regex should be lazy statics - there's really no point in having them defined and compile on each invocation of the functions they are defined in.

It would be great if you could lift all of them to the top level of the module as define them as Lazy<Regex>.

bartlomieju avatar Mar 19 '23 00:03 bartlomieju