Skip to content

Refactor API #2

Open
fyrchik opened this issue Feb 10, 2023 · 1 comment
Open

Refactor API #2

fyrchik opened this issue Feb 10, 2023 · 1 comment
Assignees

Comments

@fyrchik
Copy link

fyrchik commented Feb 10, 2023

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
Copy link
Author

fyrchik commented Feb 27, 2023

#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 up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants