diff options
| author | David Bremner <david@tethera.net> | 2023-01-05 20:02:05 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2023-04-02 19:22:36 -0300 |
| commit | 3f5809bf28becbddfed9ff33d6f1242346904c23 (patch) | |
| tree | 9ad7cad85d6dc1a0d7e6796e22032cefcd72b121 /lib/database-private.h | |
| parent | c6733a45c8ff698505ff330d2edce92c90cbc946 (diff) | |
lib: parse index.as_text
We pre-parse into a list of compiled regular expressions to avoid
calling regexc on the hot (indexing) path. As explained in the code
comment, this cannot be done lazily with reasonable error reporting,
at least not without touching a lot of the code in index.cc.
Diffstat (limited to 'lib/database-private.h')
| -rw-r--r-- | lib/database-private.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/database-private.h b/lib/database-private.h index b9be4e22..61232f1a 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -291,6 +291,10 @@ struct _notmuch_database { /* Track what parameters were specified when opening */ notmuch_open_param_t params; + + /* list of regular expressions to check for text indexing */ + regex_t *index_as_text; + size_t index_as_text_length; }; /* Prior to database version 3, features were implied by the database |
