oxc/crates
camchenry 5ae3f364e9 perf(linter): no-fallthrough: Use string matching instead of Regex for default comment pattern (#6008)
Profiling has shown this rule to be a consistent slow point, and in particular, the Regex construction is slow.

<img width="1323" alt="Screenshot 2024-09-23 at 7 12 58 PM" src="https://github.com/user-attachments/assets/1d9b367d-eeda-4b19-b0a3-463e54ac4334">

This PR improves the situation in two ways:

1. A `Regex` is only constructed when there is a custom comment pattern (which is likely the minority of cases)
2. For the default comment pattern (when no custom pattern is passed), we now use a simple string matcher function, instead of a full-blown regex matcher. I believe this should be faster since it involves much less work, though can still allocate a `String`.
2024-09-24 01:06:00 +00:00
..
oxc release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_allocator release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_ast docs(ast): document more AST nodes (#6000) 2024-09-23 23:19:43 +00:00
oxc_ast_macros release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_cfg release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_codegen release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_diagnostics perf(linter, prettier, diagnostics): use FxHashMap instead of std::collections::HashMap (#5993) 2024-09-23 16:29:05 +00:00
oxc_index release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_isolated_declarations fix(isolated-declarations): False positive for class private getter with non-inferrable return type (#5987) 2024-09-23 15:28:29 +08:00
oxc_language_server perf(ast-tools): use FxHashMap over std::collections::HashMap (#5997) 2024-09-23 18:28:54 +00:00
oxc_linter perf(linter): no-fallthrough: Use string matching instead of Regex for default comment pattern (#6008) 2024-09-24 01:06:00 +00:00
oxc_macros feat(linter): add oxc-security/api-keys (#5906) 2024-09-22 22:39:56 +00:00
oxc_mangler release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_minifier refactor(minifier): move dce conditional expression to RemoveDeadCode (#5971) 2024-09-23 10:22:00 +00:00
oxc_module_lexer release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_parser release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_prettier perf(linter, prettier, diagnostics): use FxHashMap instead of std::collections::HashMap (#5993) 2024-09-23 16:29:05 +00:00
oxc_regular_expression release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_semantic docs(semantic): document SymbolTable (#5998) 2024-09-23 23:19:41 +00:00
oxc_sourcemap release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_span release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_syntax release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_transformer refactor(transformer): arrow function transform: remove unnecessary assertion (#6002) 2024-09-23 18:05:31 +00:00
oxc_traverse release(crates): v0.30.0 (#5986) 2024-09-23 11:20:12 +08:00
oxc_wasm feat(oxc_wasm): add verbse option to debug_dot (#5879) 2024-09-19 06:13:03 +00:00