elastic icon indicating copy to clipboard operation
elastic copied to clipboard

Allow get the number of result by action

Open Elbandi opened this issue 6 years ago • 3 comments

This patch allow get the buld response status by action. Same result as len(r.Updated()), etc. but more performance (mostly in big bulk request)

Elbandi avatar Feb 11 '19 11:02 Elbandi

What's wrong with len(Indexed()) etc.?

olivere avatar Feb 11 '19 12:02 olivere

As for performance: Can you provide a benchmark?

olivere avatar Feb 11 '19 12:02 olivere

i havent benchmark :( but just looked into the source: ByAction build a new items array.

if the bulk has >100k items, thats not only lots of cpu (fields memory copy) usage, but also high memory usage ~12Mb (pure sizeof(BulkResponseItem) == 128) too.

Elbandi avatar Feb 11 '19 14:02 Elbandi