discourse/spec
Sam 29fac1ac18 PERF: improve performance of unread queries
Figuring out what unread topics a user has is a very expensive
operation over time.

Users can easily accumulate 10s of thousands of tracking state rows
(1 for every topic they ever visit)

When figuring out what a user has that is unread we need to join
the tracking state records to the topic table. This can very quickly
lead to cases where you need to scan through the entire topic table.

This commit optimises it so we always keep track of the "first" date
a user has unread topics. Then we can easily filter out all earlier
topics from the join.

We use pg functions, instead of nested queries here to assist the
planner.
2017-05-25 15:07:30 -04:00
..
components PERF: improve performance of unread queries 2017-05-25 15:07:30 -04:00
controllers FIX: Missing HTTP stub 2017-05-23 15:08:19 -04:00
fabricators FIX: CDN wasn't properly applied to category background images when using S3 2017-05-22 18:37:01 +02:00
fixtures FIX: don't search for plugins in nested subdirectories 2017-05-16 17:28:56 -04:00
helpers FEATURE: replace emoji with unicode in title and description meta tags 2017-02-22 16:24:13 -05:00
integration FEATURE: staff can set a timer to remind them about a topic 2017-05-16 14:49:50 -04:00
integrity FIX: i18n integrity specs 2017-02-24 11:35:33 +01:00
jobs FIX: Use same code path for downloading images 2017-05-23 14:51:30 -04:00
mailers Make test less vulnerable to changes. 2017-05-17 19:30:13 +08:00
models PERF: improve performance of unread queries 2017-05-25 15:07:30 -04:00
phantom_js FIX: Don't hardcode text in smoke test. 2017-05-22 08:01:33 +08:00
serializers UX: Display translated group name for automatic groups. 2017-05-05 14:34:47 +08:00
services FIX: `TopicTimestampChanger` should not allow timestamps in the future. 2017-05-22 16:03:49 +08:00
support No need for special helper to reset SiteSetting state. 2017-01-28 10:55:49 +08:00
tasks Suppress console output when running RSpec 2017-01-28 11:04:47 +05:30
views/omniauth_callbacks FIX: Weird spec 2016-06-10 11:32:32 -04:00
discourse_tagging_spec.rb FIX: prevent creation of tags with invalid characters 2016-10-12 15:44:36 -04:00
rails_helper.rb FIX: Use Excon to do its own stubbing 2017-05-22 18:19:20 -04:00