8000 Release v3.0.3: chore: adds memoize implementation for regexes and ahocorasick (#836) · tankroo1/coraza · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v3.0.3

  • v3.0.3
  • 4f30afe
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
  • Compare
    Choose a tag to compare
  • v3.0.3
  • 4f30afe
  • Compare
    Choose a tag to compare
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@jcchavezs jcchavezs tagged this 06 Aug 07:49
* chore: adds memoize implementation for regexes.

Currently we create and allocate memory for every regex we compile, however there are cases where you compile the same regex over and over e.g. https://github.com/corazawaf/coraza-caddy/issues/76. Here we implement the memoize pattern to be able to reuse the regex and reduce the memory consumption.

* docs: adds comments to code.

* chore: simplify the memoize package by using sync.Map.

* feat: extends memoize to ahocorasick and allow impl for tinygo but not synced as no concurrency.

* tests: covers memoize_builders in tinygo.

* chore: fixes nosync for tinygo.

* docs: updates docs.

---------

Co-authored-by: Juan Pablo Tosso <jptosso@gmail.com>
Assets 2
Loading
0