mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 09:58:25 +00:00
* When loading topics in bulk, only trigger state change callbacks after all the topics have been loaded and we determine that state has actually changed. * State change callbacks are also only triggered when state has changed. The use of JSON.stringify might raise some performance concerns here as this is a performance sensitive codepath. However, I measured the time for each `_setState` function call locally, by wrapping the function call with `performance.now()`, and did not see any significant overhead.