Commit Graph

14 Commits

Author SHA1 Message Date
David Taylor
fab8b8649e
PERF: Combine avatar_lookup and primary_group_lookup into user_lookup (#10253)
These two classes were running very similar queries, which could be expensive on large topics
2020-07-17 10:48:08 +01:00
Krzysztof Kotlarek
427d54b2b0 DEV: Upgrading Discourse to Zeitwerk (#8098)
Zeitwerk simplifies working with dependencies in dev and makes it easier reloading class chains. 

We no longer need to use Rails "require_dependency" anywhere and instead can just use standard 
Ruby patterns to require files.

This is a far reaching change and we expect some followups here.
2019-10-02 14:01:53 +10:00
Sam Saffron
19e3b3b1bc PERF: speed up topic poster lookups
During profiling looking up topic users popped up as a hot path, this
change more than halved the amount of work it does

It reduces object allocations and method calls and avoids repeate translation
of common terms
2019-06-05 18:28:36 +10:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Guo Xiang Tan
23b787e0a6 Require dependency otherwise it causes Sidekiq to lock up in development. 2017-09-25 13:48:59 +08:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Neil Lalonde
476ae57af3 FEATURE: primary group class on avatars in topic list 2017-02-20 15:55:10 -05:00
Sam Saffron
4e91059f89 FIX: missing avatar when sizing down window 2014-09-19 12:35:35 +10:00
Robin Ward
6ef85ea014 UX: Don't highlight the latest poster in the topic list if there is only
one avatar shown.
2014-08-20 12:09:39 -04:00
Sam
f7d4cb6745 FIX: incorrect tooltip, most posts was only sometimes right 2014-08-18 17:13:32 +10:00
Régis Hanol
9125453628 FEATURE: add the first 3 participants in a private message 2014-05-12 09:32:49 +02:00
Oren Dobzinski
d0fbabeb0b simplify TopicPostersSummary 2014-02-18 23:53:30 -05:00
Neil Lalonde
b1ef2ea1e1 Fix TopicPostersSummary when a suggested topic includes a user who has been deleted 2013-05-27 14:12:15 -04:00
Chris Hunt
c1841a6c89 Extract Topic#posters_summary 2013-05-24 15:33:45 -07:00