5.md (851B)
1 # #5 Add lazy_static or equivalent to all regex objects used internally 2 3 - **State:** closed 4 - **Author:** @donicrosby 5 - **Created:** 2021-11-08T20:18:07Z 6 - **Closed:** 2021-11-13T14:41:38Z 7 - **Labels:** enhancement 8 - **Assignees:** @MTRNord 9 10 --- 11 12 In the regex library it recommends the use of the `lazy_static!` macro on regexs that are used frequently that are not changed during runtime. 13 14 See: https://docs.rs/regex/1.5.4/regex/#example-avoid-compiling-the-same-regex-in-a-loop 15 16 While the regexs used in finding the command and removing whitespace aren't a huge load multiple commands coming in from a lot of rooms to a bot would mean those computations add up. Having those pre-compiled and ready to use would make the bot faster to respond to commands sent. 17 18 19 ## Comments 20 21 ### @donicrosby — 2021-11-10T03:37:46Z 22 23 Added support for this in #6 24