diia-open-source / be-user-service

European Union Public License 1.2
136 stars 6 forks source link

Backend: db logic in all layer #92

Open tshemsedinov opened 3 months ago

tshemsedinov commented 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

vird commented 3 months ago

Is .projection({mobileUid: 1, signAlgo: 1}) enough for this case?