Commit f2186190 authored by marko's avatar marko

branches/zip: Performance improvement:

row_merge_buf_add(): Add a prefetch instruction to row->fields.
Eliminate a variable from the copying loop, and move the termination
condition to the end of the loop.

row_merge_build_indexes(): Remove the second call to
trx_start_if_not_started().
parent 6b7c6cb3
......@@ -191,6 +191,8 @@ row_merge_buf_add(
return(FALSE);
}
UNIV_PREFETCH_R(row->fields);
index = buf->index;
n_fields = dict_index_get_n_fields(index);
......@@ -297,12 +299,15 @@ row_merge_buf_add(
field = entry;
/* Copy the data fields. */
for (i = 0; i < n_fields; i++, field++) {
do {
if (!dfield_is_null(field)) {
field->data = mem_heap_dup(buf->heap,
field->data, field->len);
}
}
field++;
} while (--n_fields);
return(TRUE);
}
......@@ -1852,8 +1857,6 @@ row_merge_build_indexes(
goto func_exit;
}
trx_start_if_not_started(trx);
/* Now we have files containing index entries ready for
sorting and inserting. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment