~drizzle-trunk/drizzle/development

Viewing all changes in revision 2188.1.1.

  • Committer: Stewart Smith
  • Date: 2011-02-22 10:26:02 UTC
  • mto: (2195.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2196.
  • Revision ID: stewart@flamingspork.com-20110222102602-umu8w3t4w86pn9gf
Replace FunctionCursor row_cache of full rows with one that is the
packed row (using similar routines as ARHCIVE does before
compression). This means we use minimal memory for each row. The ref
for ::position() is now a offset into the row_cache buffer instead of
an incrementing index into an array.

This change GREATLY reduces the memory required for various queries on
table function tables.

e.g. (measured using valgrind --tool=massif) running the
information_schema_dictionary test suite 
BEFORE: peaked at 77.5MB heap usage
AFTER:  peaked at 33.7MB heap usage

for schema_dictionary suite:
BEFORE: peaked at 782.6MB heap usage
AFTER:  peaked at 31.05MB heap usage

(i.e. memory requirements can be reduced by moer than an order of
magnitude)

A future patch may want to also overflow to disk if needed.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: