Commit Graph

14 Commits

Author SHA1 Message Date
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
Sam cb824a6b33 DEV: remove all calls to SqlBuilder use DB.build instead
This is part of the migration to mini_sql, SqlBuilder.new is being
deprecated and replaced with DB.build
2018-06-20 17:53:49 +10:00
riking 94f70c7b5c FIX: TopicViewItem: do not store IP of logged in users 2018-06-12 12:43:56 +10:00
riking 4b2e2ea8ef Change TopicViewItem to allow null IP address 2018-06-12 12:43:56 +10:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Guo Xiang Tan e8fc8f0bb6 Update annotations. 2017-03-22 14:26:53 +08:00
Guo Xiang Tan 5fb405cca2 FIX: Use custom date for redis key in `TopicViewItem.add`. 2015-09-14 11:17:28 +08:00
Sam 4a48f983fd PERF: hit all index conditions to speed up anon ip tracking 2015-05-14 17:21:02 +10:00
Sam 09e470c98a FEATURE: start counting repeat topic views (default is one per 8 hours)
configurable with topic_view_duration_hours site setting
2015-03-05 15:25:05 +11:00
Akshay 7ef61144e7 Avoid using to_s when performing String Interpolation 2014-08-14 23:55:27 +05:30
Sam cd22b6158c PERF: stop mucking with user stats every 15 minutes
(pushed to twice daily)
2014-08-07 14:20:42 +10:00
Sam 022109bc76 FIX: avoid exception in path that is very exception prone 2014-08-07 13:14:39 +10:00
Sam 3cab3acd60 FIX: stop logging way too much information 2014-08-05 16:14:28 +10:00
Sam cb0ecd9ff1 PERF: store topic views in a topic view table
* cut down on storage of the work Topic, 3 times per row (in 2 indexes)
* only store one view per user per topic
* only store one view per ip per topic
2014-08-04 19:07:55 +10:00