Re: compute swap_file_sz before packing it

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 27 Oct 2009 13:50:04 -0600

On 09/14/2009 04:49 PM, Robert Collins wrote:
> Just a small meta point: The new function you're adding looks like it
> should be a method to me.

It should be. It is not because it is very dependent on the internal
storeSwapMetaBuild() algorithm, and I wanted to keep the two functions
close to each other. I added XXX to reflect the dependency.

I do not think the dependency should be broken: we need to predict the
packed header size and do not want to spend CPU cycles on packing twice
or make the code even worse by adding "if (really_pack)" statements to
storeSwapMetaBuild() and friends.

Thank you,

Alex.
Received on Tue Oct 27 2009 - 19:49:25 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 28 2009 - 12:00:05 MDT