You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, upvotedUsers in FireDiscussionQuestion is a string array. This translates to an array in Firestore, which is essentially a map with the index of each upvoted user as the key. I'm not 100% on this but I believe this translates to an O(n) lookup time.
If we convert upvotedUsers: Record<string, {}> to mimic a set (and have Firestore updated to store upvotedUsers as a map) then we may see some performance benefit :')
The text was updated successfully, but these errors were encountered:
Currently,
upvotedUsers
in FireDiscussionQuestion is a string array. This translates to an array in Firestore, which is essentially a map with the index of each upvoted user as the key. I'm not 100% on this but I believe this translates to an O(n) lookup time.If we convert
upvotedUsers: Record<string, {}>
to mimic a set (and have Firestore updated to store upvotedUsers as a map) then we may see some performance benefit :')The text was updated successfully, but these errors were encountered: