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

Backend issue: Performance and memory problem #80

Open
tshemsedinov opened this issue Mar 15, 2024 · 2 comments
Open

Backend issue: Performance and memory problem #80

tshemsedinov opened this issue Mar 15, 2024 · 2 comments

Comments

@tshemsedinov
Copy link

All filters and transformations should be executed in database, not in app server memory

async getIdentifierAvailability(userIdentifier: string, mobileUid: string): Promise<DiiaIdIdentifier[]> {
await this.checkIfCreationExpiredAndSoftDelete(userIdentifier)
const diiaIds: DiiaIdModel[] = await diiaIdModel.find({ mobileUid, userIdentifier, isDeleted: false })
return diiaIds
.filter((diiaId) => this.isDiiaIdActive(diiaId))
.map(({ identifier, signAlgo }) => {
return { identifier, signAlgo }
})
}

@vird
Copy link

vird commented Mar 17, 2024

#97

@ghost
Copy link

ghost commented Mar 25, 2024

Hi @tshemsedinov ;)
Thank you for your attention. Using your example, you can offer options for solving such a problem with the community.

We look forward to your pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants