[bitshares/bitshares-core] elasticsearch move instead of copy (#1249)

This is an attempt to apply a `move` instead of `copy` in the high frequency action of appending an operation(2 lines) into the `bulk_lines` vector.
This is part of https://github.com/bitshares/bitshares-core/issues/1224 , mainly for review and see if we can apply to some other places if good enough.

It also reserve the size of the vector, should be better than extending it dynamically with each new op. The `bulk_line` can only be of 2 different sizes, depending on if we are in sync or not so we have to make a check on each block but the reserve itself should be only executed 2 times(1- we add replay size 2- change to in sync size).
You can view, comment on, or merge this pull request online at:

https://github.com/bitshares/bitshares-core/pull/1249

— Commit Summary —

* replace a copy by a move

— File Changes —

M libraries/plugins/elasticsearch/elasticsearch_plugin.cpp (6)

— Patch Links —

https://github.com/bitshares/bitshares-core/pull/1249.patch
https://github.com/bitshares/bitshares-core/pull/1249.diff

Добавить комментарий