Make the dblist grow more quickly when many directory blocks are added,
otherwise the array has to get copied too often, which is slow when it
is large.
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if (dblist->count >= dblist->size) {
old_size = dblist->size * sizeof(struct ext2_db_entry);
- dblist->size += 100;
+ dblist->size += dblist->size > 200 ? dblist->size / 2 : 100;
retval = ext2fs_resize_mem(old_size, (size_t) dblist->size *
sizeof(struct ext2_db_entry),
&dblist->list);