Skip to content

Conversation

@Koc
Copy link
Contributor

@Koc Koc commented Dec 28, 2025

I've found that we are creating Cell entity just to call few methods of it. We can avoid of doing that and speedup /row/table/{tableId} endpoint up to 2x. For a table with 2k rows I've got a latency decrease from 1.15s to 0.568s with my PR.

Without patch
image

With patch
image

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc requested review from blizzz and enjeck as code owners December 28, 2025 13:20
@Koc Koc added the performance Performance issues and optimisations label Jan 4, 2026
@blizzz
Copy link
Member

blizzz commented Jan 5, 2026

Hesitant… not a fan of passing around wild arrays, but at least the source can be considered OK.
Did you see what was slowing down instantiating the entity instance?

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Copy link
Contributor Author

Koc commented Jan 5, 2026

I haven't profiled it deeply, but guess this caused by instance creation and calls tons of setters.

IMHO it's totally fine to operate with arrays here, as this is data access layer which produces read models (which are objects BTW). Part of the code which is responsible for write/mutations still operates entities.

@blizzz check referenced PRs to see more impressive speedup 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issues and optimisations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants