Coming from #11226 (comment)
Problem
There is code that generates the display name of a report. This code may be non-performant at scale and turn into a bottle neck.
Solution
Consider some solutions:
- memoizing the report name generation
- generating the display name on the server
- storing the displayName in a map instead of cloning the reports in a map
@marcaaron I'm particularly interested in your thoughts on solution 2. The report name will only change when:
- The participants change (I don't think we ever change participants... We either archive the report or create a new report when adding participants
- The type of chat report changes (I don't think it's possible to change the type of a chat report)
- The chat is archived (valid reason)
- The details of the participants change (valid reason)
Because of point 4, maybe that's the best reason to keep the display name generation on the client and to use solution 1 or 3 above?
Coming from #11226 (comment)
Problem
There is code that generates the display name of a report. This code may be non-performant at scale and turn into a bottle neck.
Solution
Consider some solutions:
@marcaaron I'm particularly interested in your thoughts on solution
2. The report name will only change when:Because of point
4, maybe that's the best reason to keep the display name generation on the client and to use solution 1 or 3 above?