Reduce the memory requirement for large ispell dictionaries.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3e5f9412d0a818be77c974e5af710928097b91f3
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-10-06T23:31:05Z
Releases: 9.1.0
Reduce the memory requirement for large ispell dictionaries.

This patch eliminates per-chunk palloc overhead for most small allocations
needed in the representation of an ispell dictionary.  This saves close to
a factor of 2 on the current Czech ispell data.  While it doesn't cover
every last small allocation in the ispell code, we are at the point of
diminishing returns, because about 95% of the allocations are covered
already.

Pavel Stehule, rather heavily revised by Tom

Files

PathChange+/−
src/backend/tsearch/spell.c modified +70 −12
src/include/tsearch/dicts/spell.h modified +4 −0