Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT]: optimize object expansion database access #1017

Closed
Tracked by #1008
rixvet opened this issue Oct 25, 2023 · 0 comments
Closed
Tracked by #1008

[ENHANCEMENT]: optimize object expansion database access #1017

rixvet opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
new feature New feature to be added server Hashtopolis API/Server related

Comments

@rixvet
Copy link
Collaborator

rixvet commented Oct 25, 2023

When requesting related objects the return time is slow, since every expansion is handled on a individual basis, causing a lot individual database queries. Related objects instead should be fetched in bulk, to reduce DB queries and speed-up results.

@rixvet rixvet self-assigned this Oct 25, 2023
@rixvet rixvet added this to the APIv2 Preview 3 milestone Oct 25, 2023
rixvet pushed a commit that referenced this issue Oct 25, 2023
Instead of fetching the related object one object at the time,
requested all related objects ,via fetchExpandObjects, for given list
of objects.

This will reduce DB queries required for expansion from
O(<num-objects> * <num-expands>) to O(<num-expands>)

Added bonus we do not fetch duplicated objects anymore,
 reducing the amount of objects which requires processing.

Fixes #1017
@rixvet rixvet added new feature New feature to be added server Hashtopolis API/Server related labels Oct 25, 2023
@rixvet rixvet closed this as completed Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature to be added server Hashtopolis API/Server related
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant