Refactor API #2

Open
opened 2023-02-10 13:57:19 +00:00 by fyrchik · 1 comment
fyrchik commented 2023-02-10 13:57:19 +00:00 (Migrated from github.com)

Current implementation heavily uses reflection and is used on a hot path in many places in neofs-node:

  1. Shard sorting
  2. Calculating container nodes for a placement policy.

It makes sense to optimize for common use-cases:

  1. Uniform sorting.
  2. Think about reusing memory and designing an appropriate API.
  3. Use sync.Pool and see if it helps.

May be we could use generics here, but the task is not about this.

Current implementation heavily uses reflection and is used on a hot path in many places in neofs-node: 1. Shard sorting 2. Calculating container nodes for a placement policy. It makes sense to optimize for common use-cases: 1. Uniform sorting. 2. Think about reusing memory and designing an appropriate API. 3. Use `sync.Pool` and see if it helps. May be we _could_ use generics here, but the task is not about this.
fyrchik commented 2023-02-27 09:42:14 +00:00 (Migrated from github.com)

#3 provided perfomance improvements for the most common use-cases.
Let's not close this task, to see whether we can optimize this further.

#3 provided perfomance improvements for the most common use-cases. Let's not close this task, to see whether we can optimize this further.
Sign in to join this conversation.
There is no content yet.