[MDEV-13121] Optimize String processing in Protocol::send() Created: 2017-06-19 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types, OTHER |
| Fix Version/s: | 10.11 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Under terms of Consider this script:
This is an except from Protocol::send_result_set_row:
Notice, the local buffer str_buffer is shared between columns of the same record, but it is not shared between multiple records of the same result set. The buffer str_buffer is recursively passed to Item_func_hex::val_str_ascii(), which has to do alloc(1001) on every row, because the result does not fit into Under terms of this task we will:
This will allow to share the memory allocated on the first row for the consequent rows. |