discourse/spec/components
Guo Xiang Tan 5d4221fbe1 PERF: Avoid calling expensive PostGuardian#can_see_post? multiple times.
Before

```
Your Results: (note for timings- percentile is first, duration is second
in millisecs)
---
topic_admin:
  50: 19
  75: 19
  90: 21
  99: 27
topic:
  50: 56
  75: 62
  90: 64
  99: 99
timings:
  load_rails: 1262
ruby-version: 2.4.1-p111
rss_kb: 198432
pss_kb: 136612
virtual: physical
architecture: amd64
operatingsystem: Ubuntu
memorysize: 15.59 GB
kernelversion: 4.10.0
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
rss_kb_9877: 327892
pss_kb_9877: 263671
rss_kb_9946: 325468
pss_kb_9946: 261671
rss_kb_10153: 326456
pss_kb_10153: 262657
```

After

```
Your Results: (note for timings- percentile is first, duration is second
in millisecs)
---
topic_admin:
  50: 18
  75: 18
  90: 20
  99: 28
topic:
  50: 41
  75: 42
  90: 46
  99: 49
timings:
  load_rails: 1201
ruby-version: 2.4.1-p111
rss_kb: 187936
pss_kb: 123596
virtual: physical
architecture: amd64
operatingsystem: Ubuntu
memorysize: 15.59 GB
kernelversion: 4.10.0
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
rss_kb_26478: 342360
pss_kb_26478: 276696
rss_kb_26547: 340368
pss_kb_26547: 275930
rss_kb_26747: 338964
pss_kb_26747: 274466
```
2017-09-08 14:07:24 +08:00
..
active_record/connection_adapters Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
auth Sidekiq::Testing.fake! is the default mode. 2017-08-24 09:40:19 +09:00
common_passwords Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
concern FIX: when registering custom_field types, ensure we're casting them before checking for equality 2017-08-16 23:04:40 +02:00
email FIX: allow an admin to click on blank errors (#5027) 2017-08-04 20:04:26 +02:00
file_store correct fragile spec 2017-08-31 15:55:56 -04:00
freedom_patches Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
highlight_js Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
import Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
middleware Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
onebox/engine Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
plugin FIX: Remove unused test 2017-07-28 11:59:12 -04:00
scheduler add more diagnostics for flaky spec 2017-08-23 10:41:57 -04:00
sidekiq Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
site_settings FIX: fails loud if default setting is not set 2017-08-15 12:07:25 +02:00
stylesheet Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
validators correct spec 2017-08-24 10:40:14 -04:00
wizard Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
admin_confirmation_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
admin_user_index_query_spec.rb FIX: Don't allow staff to approve users with unverified emails 2017-09-04 12:55:39 -04:00
archetype_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
avatar_lookup_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
cache_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
column_dropper_spec.rb Remove email column from user table 2017-08-29 11:50:56 -04:00
composer_messages_finder_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
content_buffer_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
cooked_post_processor_spec.rb Merge branch 'master' into search_posts_with_images 2017-07-31 10:44:41 -04:00
crawler_detection_spec.rb Add YandexBot to our list of crawlers 2016-07-26 13:21:37 -04:00
current_user_spec.rb FEATURE: per client user tokens 2017-02-07 09:22:16 -05:00
directory_helper_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
discourse_diff_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_event_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_hub_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_i18n_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_plugin_registry_spec.rb Support for an HTML builder that can create dynamic HTML 2017-04-17 17:32:55 -04:00
discourse_plugin_spec.rb More randomly failing specs fixes. 2016-09-05 19:33:03 +08:00
discourse_redis_spec.rb Make Redis test less brittle. 2017-08-24 10:00:15 +09:00
discourse_spec.rb Use find instead. 2017-08-21 22:28:43 +09:00
discourse_updates_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
distributed_cache_spec.rb Correct flaky distributed cache test 2017-08-01 16:11:48 -04:00
distributed_memoizer_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
distributed_mutex_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
email_cook_spec.rb FIX: Another onebox head request 2017-05-22 17:00:19 -04:00
email_updater_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
enum_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
file_helper_spec.rb Use webmock to stub external web requests. 2017-05-26 15:19:09 +08:00
filter_best_posts_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
final_destination_spec.rb FIX: allows onebox to force GET hosts returning wrong headers on HEAD 2017-08-08 11:44:27 +02:00
flag_query_spec.rb UX: keep emojis in excerpts in flag queue 2017-08-14 15:16:47 +02:00
gaps_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
global_path_spec.rb FIX: when CDN assets are not in root path source maps fail 2016-02-05 13:05:47 +11:00
guardian_spec.rb PERF: Avoid calling expensive PostGuardian#can_see_post? multiple times. 2017-09-08 14:07:24 +08:00
has_errors_spec.rb FIX: show proper error message when no user selected for private message 2016-05-05 18:47:08 +05:30
html_normalize_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
html_prettify_spec.rb FEATURE: stop escaping special chars in title prettify 2017-03-13 10:02:20 -04:00
html_to_markdown_spec.rb Some more HTML to Markdown fixes (#5046) 2017-08-14 22:13:24 +02:00
image_sizer_spec.rb Nuke all SiteSetting.stubs from our codebase. 2017-07-07 15:09:14 +09:00
inline_oneboxer_spec.rb FEATURE: option to enable inline oneboxes for all domains 2017-08-02 14:27:31 -04:00
js_locale_helper_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
json_error_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
letter_avatar_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
new_post_manager_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
new_post_result_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
oneboxer_spec.rb FIX: Onebox will do a HEAD request first for redirects 2017-05-22 16:52:26 -04:00
onpdiff_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
pbkdf2_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
pinned_check_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_action_creator_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_creator_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_destroyer_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_enqueuer_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
post_merger_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_revisor_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
pretty_text_spec.rb FEATURE: allowed_iframes site setting for allowing iframes 2017-09-01 10:15:44 -04:00
promotion_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
rate_limiter_spec.rb FEATURE: Warn a user when they have few likes remaining 2016-03-18 11:30:29 -04:00
redis_store_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
retrieve_title_spec.rb FEATURE: option to enable inline oneboxes for all domains 2017-08-02 14:27:31 -04:00
rtl_spec.rb Nuke all SiteSetting.stubs from our codebase. 2017-07-07 15:09:14 +09:00
s3_helper_spec.rb Prepare for separation of RSpec helper files 2015-12-01 20:39:42 +00:00
score_calculator_spec.rb PERF: make score calculator cheaper when site has long topics 2016-07-22 09:48:44 +10:00
search_spec.rb FEATURE: show tags in search results 2017-08-25 11:52:59 -04:00
secure_session_spec.rb SECURITY: prevent reuse of password reset 2016-12-19 18:00:22 +11:00
site_setting_extension_spec.rb Can't revert due to incompatibility of new site setting types. 2017-08-07 10:43:09 +09:00
slug_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
spam_handler_spec.rb Nuke all SiteSetting.stubs from our codebase. 2017-07-07 15:09:14 +09:00
sql_builder_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
stats_socket_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
suggested_topics_builder_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
system_message_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
table_migration_helper_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
text_cleaner_spec.rb FIX: Title prettify shoundn't downcase all non-ascii titles 2017-08-08 14:03:24 -03:00
text_sentinel_spec.rb Nuke all SiteSetting.stubs from our codebase. 2017-07-07 15:09:14 +09:00
timeline_lookup_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_creator_spec.rb REFACTOR: Just pass a block instead of using a lambda. 2017-08-29 08:26:48 +08:00
topic_query_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_retriever_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_view_spec.rb Oops fix build again. 2017-09-07 18:59:02 +08:00
topics_bulk_action_spec.rb fix randomly failing specs 2017-03-27 22:47:41 +02:00
trashable_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
trust_level_spec.rb Enums that are used in tables need to be stable 2016-01-08 20:43:11 +05:30
unread_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
url_helper_spec.rb FIX: absolute URL for CDN should always be rooted with a protocol 2016-09-05 15:57:46 +10:00
user_name_suggester_spec.rb FIX: Don't suggest invalid username 2016-02-21 23:28:57 +01:00
version_spec.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00