git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 3cbfe48) | patch
Avoid repeated creation/freeing of per-subre DFAs during regex search.
2012年2月24日 19:56:35 +0000 (14:56 -0500)
2012年2月24日 23:40:30 +0000 (18:40 -0500)
commit 587359479acbbdc95c8e37da40707e37097423f5
Avoid repeated creation/freeing of per-subre DFAs during regex search.

In nested sub-regex trees, lower-level nodes created DFAs and then
destroyed them again before exiting, which is a bit dumb considering that
the recursive search is likely to call those nodes again later. Instead
cache each created DFA until the end of pg_regexec(). This is basically a
space for time tradeoff, in that it might increase the maximum memory
usage. However, in most regex patterns there are not all that many subre
nodes, so not that many DFAs --- and in any case, the peak usage occurs
when reaching the bottom recursion level, and except for alternation cases
that's going to be the same anyway.
src/backend/regex/regexec.c diff | blob | blame | history
src/include/regex/regguts.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /