Open tshemsedinov opened 3 months ago
Map can be moved to database, no need to transfer all unneeded data to app server and iterate it there. May significantly reduce performance and increase memory usage.
https://github.com/diia-open-source/be-user-service/blob/b45a0e2db354df110a99254516a414aaac43be61/src/services/diiaId.ts#L832-L835
Is .projection({mobileUid: 1, signAlgo: 1}) enough for this case?
.projection({mobileUid: 1, signAlgo: 1})
Map can be moved to database, no need to transfer all unneeded data to app server and iterate it there. May significantly reduce performance and increase memory usage.
https://github.com/diia-open-source/be-user-service/blob/b45a0e2db354df110a99254516a414aaac43be61/src/services/diiaId.ts#L832-L835