C: Columns: optimizing column file growth

This commit is contained in:
Celine Mercier
2020-04-18 13:55:47 +02:00
parent da8de52ba4
commit 0f745e0113
3 changed files with 6 additions and 2 deletions

View File

@ -1974,6 +1974,10 @@ int obi_enlarge_column(OBIDMS_column_p column)
// Calculate the new file size
old_line_count = (column->header)->line_count;
new_line_count = ceil((double) old_line_count * (double) COLUMN_GROWTH_FACTOR);
if (new_line_count > old_line_count+100000)
new_line_count = old_line_count+100000;
else if (new_line_count < old_line_count+1000)
new_line_count = old_line_count+1000;
if (new_line_count > MAXIMUM_LINE_COUNT)
{