This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib
Sam 1b34a8b48a FIX: remove slow platform detection from server side
Historically due to https://meta.discourse.org/t/why-is-discourse-so-slow-on-android/8823
we decreased page sizes of both home page and topic page on android by half.

This was done on the server side and as a side effect and caused page sizes on android
to mismatch between Android and non Android.

Unfortunately about a year ago googlebot started pretending it is Android,
this cause Google to start indexing pages as what android would see. So
it saw double the amount of pages in the index as what exists on desktop.
This in turn caused double the amount of indexing work and a large amount
of broken links on long topics.

This fix removes all special behavior which is no longer needed due to
other performance work in Discourse including raw handlebars on home page
and virtual dom on topic pages.

I tested we do not need this on Blu Advance 5.0 it has 1.3 GHZ mediatec mt6580
This phone retails for around $50 USD.

If we decide long term that we want any hacks like this we will shift them
to the client side. It can just hold data in memory without rendering.
2018-12-13 16:14:37 +11:00
..
active_record/connection_adapters Be more forceful in disconnecting connections during failover. 2018-09-04 10:32:43 +08:00
auth SECURITY: Add CSRF protections to OpenID callback 2018-11-05 11:07:35 +00:00
autospec DEV: correct watcher for controller specs 2018-08-22 14:35:57 +10:00
backup_restore FIX: Create BaseDropper functions in a different schema. 2018-08-23 12:52:21 +08:00
common_passwords Make rubocop happy again. 2018-06-07 13:28:18 +08:00
demon DEV: handle termination cleanly in autospec 2018-06-19 16:13:36 +10:00
email Enable Lint/ShadowingOuterLocalVariable for Rubocop. 2018-09-04 10:16:42 +08:00
emoji FEATURE: emoji 11.0 "recently added" update (#6275) 2018-08-16 11:59:45 +02:00
es6_module_transpiler FEATURE: Use Glimmer compiler for widget templates 2017-09-01 09:28:16 -04:00
file_store Add RECOVER_FROM_S3 to uploads:list_posts_with_broken_images rake task. 2018-09-10 15:14:30 +08:00
freedom_patches Enable Lint/ShadowingOuterLocalVariable for Rubocop. 2018-09-04 10:16:42 +08:00
generators/plugin DEV: plugin generator support for spec/test/controller/routes (#6344) 2018-08-30 16:38:25 +02:00
guardian FIX: Do not serialize user fields unless they are specified for display (#6736) 2018-12-07 11:08:59 +00:00
highlight_js update highlight.js to 9.12.0 2017-07-05 11:12:10 +02:00
i18n Resetting miniracer context results in segfault 2018-09-07 00:19:23 +02:00
import Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
import_export Enable Lint/ShadowingOuterLocalVariable for Rubocop. 2018-09-04 10:16:42 +08:00
javascripts updates moment.js 2.22.1 and vendor moment-timezone 0.5.14 2018-04-26 09:15:53 +02:00
middleware SECURITY: enforce hostname to match discourse hostname 2018-11-15 16:17:22 +11:00
migration Backward compatibility for dropping functions in ColumnDropper. 2018-09-17 14:52:09 +08:00
onebox Make rubocop happy again. 2018-06-07 13:28:18 +08:00
plugin sort official plugin list, remove duplicate entry 2018-09-09 13:41:26 -04:00
pretty_text FIX: Incorrect/missing extension in short_url fails to map to upload. 2018-09-05 21:48:58 +08:00
rate_limiter Add specs for RateLimiter::LimitExceeded#description. 2018-06-19 07:48:03 +08:00
scheduler REFACTOR: extract scheduler to the mini_scheduler gem 2018-07-31 17:12:55 -04:00
search FEATURE: show tags in search results 2017-08-25 11:52:59 -04:00
sidekiq FIX: queue heartbeats in readonly modes 2018-08-29 12:36:59 +10:00
site_settings FEATURE: introduces list/compact_list components 2018-08-03 16:41:37 -04:00
stylesheet FIX: precompile desktop_theme and mobile_theme stylesheets 2018-08-31 21:23:55 +10:00
tasks Add dry run option to UploadRecovery. 2018-09-14 10:50:53 +08:00
theme_store FIX: unable to import private themes due to key checking 2018-04-03 16:11:03 +10:00
validators Merge master 2018-09-10 19:39:09 -04:00
wizard FIX: automatically correct bad avatars on access 2018-08-16 16:32:56 +10:00
admin_confirmation.rb SECURITY: Confirm new administrator accounts via email 2017-04-04 15:59:01 -04:00
admin_constraint.rb Revert "FIX: Don't rate limit admin and staff constraints when matching routes." 2018-09-04 14:27:21 +08:00
admin_user_index_query.rb FEATURE: Second factor backup 2018-06-28 10:12:32 +02:00
age_words.rb reused value of Time.now in a method 2015-12-01 21:06:37 +00:00
archetype.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
auth.rb REFACTOR: Serve auth provider information in the site serializer. 2018-08-06 09:25:48 +01:00
avatar_lookup.rb UX: show full name on /latest page 2018-08-23 14:41:06 +05:30
badge_posts_view_manager.rb Extract badge_posts view management logic into a service object. 2018-09-03 09:51:35 +08:00
badge_queries.rb FEATURE: Support an end date for user silencing 2017-11-14 13:20:19 -05:00
base62.rb remove constant warning in base62 file 2018-01-19 19:52:42 +01:00
cache.rb dashboard next: caching, mobile support and new charts 2018-05-03 15:41:41 +02:00
canonical_url.rb FIX: absolute canonical link on topic pages 2013-12-12 17:24:00 +01:00
category_badge.rb SECURITY: category badges should HTML escape names 2018-06-28 18:16:12 +10:00
comment_migration.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
composer_messages_finder.rb FIX: only show the sequential replies warning for regular posts 2018-07-04 22:51:19 +02:00
configurable_urls.rb Don't blow up if Redis switches to READONLY 2015-04-24 14:37:16 -04:00
content_buffer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
cooked_post_processor.rb Always link post to uploads in post process. 2018-09-06 14:08:03 +08:00
crawler_detection.rb FIX: cubot android devices were detected as crawlers 2018-06-21 10:56:46 +10:00
current_user.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
custom_renderer.rb Initial release of Discourse 2013-02-05 14:16:51 -05:00
custom_setting_providers.rb Plugins can register providers for global settings 2017-01-09 17:18:58 -05:00
db_helper.rb DbHelper.remap: add options to anchor at left and right of the column value 2018-06-07 13:16:03 -04:00
directory_helper.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_cookie_store.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_diff.rb FIX: don't add diff classes more than once 2018-04-16 15:41:45 +02:00
discourse_event.rb Remove stubs on DiscourseEvent in tests. 2017-06-01 16:21:00 +09:00
discourse_hub.rb add support for Excon connection options in hub requests 2018-08-30 15:57:11 -04:00
discourse_iife.rb Allow the loader to understand when files are moved 2016-11-15 11:41:16 -05:00
discourse_logstash_logger.rb FIX: Incorrect formatter used when logstash formatter is enabled. 2018-04-17 12:07:52 +08:00
discourse_plugin_registry.rb FEATURE: List, revoke and reconnect associated accounts. Phase 1 (#6099) 2018-07-23 16:51:57 +01:00
discourse_plugin.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_redis.rb FIX: Be more aggressive in checking master when trying to fallback. 2018-06-12 00:09:15 +08:00
discourse_tagging.rb FIX: automatically in/decrement topic_tags.pm_topic_count 2018-05-15 16:05:48 +02:00
discourse_updates.rb REFACTOR: Avoid duplicated logic on server and client. 2017-11-21 17:10:04 +08:00
discourse.rb DEV: Include caller in error message for Discourse#execute_command. 2018-08-17 16:17:07 +08:00
disk_space.rb FIX: more resilient/consistent dashboard caching (#6223) 2018-08-01 09:45:50 -04:00
distributed_cache.rb FIX: support Arrays with Marshal dump in distributed cache 2018-08-08 16:44:56 +10:00
distributed_memoizer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
distributed_mutex.rb FIX: correct readonly timeout 2018-09-20 15:19:46 +10:00
edit_rate_limiter.rb Add better error messages for rate limits. 2015-09-24 13:52:46 -04:00
email_backup_token.rb FEATURE: further restrict downloading of backups 2017-03-01 08:28:34 -07:00
email_cook.rb replace indentation with non-breaking spaces when cooking emails 2017-11-18 17:16:44 +01:00
email_updater.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
email.rb Upgrade mail gem to remove dependency on mime-types. 2018-03-14 14:37:55 +08:00
encodings.rb Use rchardet instead of charlock_holmes gem 2018-08-01 10:41:20 +02:00
enum_site_setting.rb Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
enum.rb Enums that are used in tables need to be stable 2016-01-08 20:43:11 +05:30
excerpt_parser.rb FIX: Calculation of text length for <details> in excerpt was wrong 2018-03-12 16:55:23 +01:00
feed_element_installer.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
feed_item_accessor.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
file_helper.rb Fix the build. 2018-08-17 16:53:07 +08:00
filter_best_posts.rb PERF: Remove Object#present? check introduced in e0d5d9670a. 2017-09-07 21:36:27 +08:00
final_destination.rb Merge master 2018-09-10 19:39:09 -04:00
flag_query.rb FIX: Flagged Post custom fields were not respecting type 2018-08-21 15:33:15 -04:00
flag_settings.rb Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
gaps.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
global_path.rb FEATURE: allow specifying s3 config via globals 2017-10-06 16:20:01 +11:00
guardian.rb SECURITY: Require groups to be given when inviting to a restricted category. (#6715) 2018-12-07 15:54:53 +08:00
has_errors.rb Add PostCreator#create!. 2016-07-15 11:36:06 +08:00
headless-ember.js JSHint headless-ember 2014-03-11 03:18:57 -04:00
hijack.rb FEATURE: detect when client thinks user is logged on but is not 2018-03-06 16:49:31 +11:00
homepage_constraint.rb FEATURE: Allow the user to select a custom home page (#5268) 2017-11-10 06:45:19 +11:00
html_prettify.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
html_to_markdown.rb FIX: handle <pre> inside <blockquote> in html_to_markdown 2018-02-26 23:28:02 +01:00
image_sizer.rb FIX: cropping GIF wasn't working 2016-07-27 18:48:02 +02:00
inline_oneboxer.rb FIX: Respect invalidate_oneboxes option for inline oneboxes 2018-09-03 22:33:43 +05:30
introduction_updater.rb FIX: Don't throw exception if welcome topic cannot be found 2018-08-15 15:50:55 +01:00
ip_addr.rb Replace certain uses of 'gsub' with 'tr' or 'chomp' for a speed 2016-06-10 22:08:37 -05:00
js_locale_helper.rb FIX: Ensure we have proper timeout for MiniRacer. 2018-06-12 11:48:08 -04:00
json_error.rb FEATURE: View flags grouped by topic 2017-09-25 12:25:14 -04:00
letter_avatar.rb FIX: don't generate an exception when trying to cleanup unexisting tmp letter avatars 2018-05-30 15:33:58 +02:00
markdown_linker.rb FIX: subfolder digest emails have incorrect URLs 2018-08-07 16:38:17 -04:00
mem_info.rb do not pull hotlinked images when max_image_size_kb == 0 2013-11-13 17:30:48 +01:00
message_bus_diags.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
method_profiler.rb FIX: stop double counting net calls in logs 2018-02-28 10:45:11 +11:00
mini_sql_multisite_connection.rb Move into MiniSQLMultisiteConnection, and add test for rollback 2018-07-24 09:41:55 +01:00
mobile_detection.rb radically simplify our mobile user agent detection 2016-03-26 02:02:23 -07:00
new_post_manager.rb FEATURE: per-category approval settings (#5778) 2018-07-13 12:51:08 +10:00
new_post_result.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
notification_levels.rb Server side code for Watching First Post Only 2016-07-07 11:21:50 -04:00
oneboxer.rb FIX: Ignore OneBox blacklisted domains. 2018-08-27 20:40:55 +02:00
onpdiff.rb add onpdiff tests 2013-12-16 18:39:49 +01:00
pbkdf2.rb more prep work for jRuby 2018-02-26 10:25:58 +11:00
permalink_constraint.rb FIX: permalink normalization not applied at constraint 2015-07-22 13:40:45 +10:00
pinned_check.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
plain_text_to_markdown.rb FEATURE: convert plain text emails to markdown 2017-12-06 01:47:51 +01:00
plugin_gem.rb Add some more debugging information when a plugin can't find a gem 2017-08-02 14:00:18 -04:00
post_action_creator.rb PERF: Avoid calling expensive PostGuardian#can_see_post? multiple times. 2017-09-08 14:07:24 +08:00
post_creator.rb Always link post to uploads in post process. 2018-09-06 14:08:03 +08:00
post_destroyer.rb FIX: user-deleted posts with deferred flags can be destroyed 2018-08-09 14:54:31 -04:00
post_enqueuer.rb FIX: When approving/rejecting a post it should delete the user action 2015-04-24 15:25:47 -04:00
post_jobs_enqueuer.rb Always link post to uploads in post process. 2018-09-06 14:08:03 +08:00
post_locker.rb FEATURE: Staff members can lock posts 2018-01-26 14:01:30 -05:00
post_merger.rb FIX: Revised post not updated correctly when merging posts. 2016-08-11 09:01:54 +08:00
post_revisor.rb FEATURE: per-category approval settings (#5778) 2018-07-13 12:51:08 +10:00
pretty_text.rb FIX: Respect invalidate_oneboxes option for inline oneboxes 2018-09-03 22:33:43 +05:30
primary_group_lookup.rb PERF: Remove N+1 query when generating posters summary. 2017-09-14 12:07:35 +08:00
promotion.rb FEATURE: send message when a user reaches tl1 2018-06-22 13:20:00 -07:00
quote_comparer.rb FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter.rb correct return value 2018-04-25 08:44:07 +10:00
remap.rb REFACTOR: move remap out of script into a class 2018-08-15 12:37:52 -04:00
retrieve_title.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
route_format.rb FIX: RouteFormat is a better class name than RouteFormats 2017-12-21 15:30:32 -05:00
rtl.rb DEV: Move RTL into lib where it belongs 2017-07-03 15:26:57 -04:00
s3_helper.rb DEV: Update uploads:list_posts_with_broken_images to recover from tombstone. 2018-09-10 17:01:41 +08:00
score_calculator.rb PERF: we have no use for topic percent rank 2018-07-05 15:10:19 +10:00
screening_model.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
search.rb FIX: revert diacritic stripping 2018-08-31 11:46:55 +10:00
secure_session.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
single_sign_on.rb FEATURE: allow specifying locale via SSO 2018-08-30 09:58:03 +10:00
site_setting_extension.rb FIX: store the topic links using the cooked upload url 2018-08-14 12:23:32 +02:00
slug.rb FIX: strip emoji string from slug 2018-04-18 11:32:32 +05:30
socket_server.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
source_url.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
spam_handler.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
sql_builder.rb DEV: remove all calls to SqlBuilder use DB.build instead 2018-06-20 17:53:49 +10:00
staff_constraint.rb Revert "FIX: Don't rate limit admin and staff constraints when matching routes." 2018-09-04 14:27:21 +08:00
staff_message_format.rb More extensibility for custom silence/suspend messages 2018-01-19 11:35:19 -05:00
stats_socket.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
suggested_topics_builder.rb Avoid allocating an extra array. 2017-09-08 14:07:24 +08:00
system_message.rb Convert server side paths to use /u/ 2017-03-30 10:23:24 -04:00
text_cleaner.rb FIX: strip zero width spaces from topic title 2018-02-21 00:12:39 +05:30
text_sentinel.rb rename 'min_private_message_{post/title}_length' to 'min_personal_message_{post/title}_length' 2018-02-01 13:25:29 +05:30
theme_settings_manager.rb FEATURE: introduces list/compact_list components 2018-08-03 16:41:37 -04:00
theme_settings_parser.rb FEATURE: introduces list/compact_list components 2018-08-03 16:41:37 -04:00
timeline_lookup.rb PERF: Don't pluck all the columns just to retrieve a single value. 2018-06-27 11:41:35 +08:00
topic_creator.rb FEATURE: hide enable_personal_email_messages and min_trust_to_send_email_messages 2018-08-27 11:38:22 +10:00
topic_list_responder.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_publisher.rb FIX: Update last_version_at when publishing 2018-03-26 16:06:20 -04:00
topic_query_sql.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
topic_query.rb FIX: remove slow platform detection from server side 2018-12-13 16:14:37 +11:00
topic_retriever.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_subtype.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_view.rb FIX: remove slow platform detection from server side 2018-12-13 16:14:37 +11:00
topics_bulk_action.rb FIX: Bulk deleting topics should ignore already deleted topics 2018-08-14 16:37:52 +02:00
trust_level.rb FIX: admin trust level user list URL should be consistent with new naming 2015-11-23 14:28:56 +05:30
twitter_api.rb FIX: allow Twitter videos to go fullscreen 2018-07-19 10:22:36 +05:30
unread.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
upload_creator.rb Merge master 2018-09-10 19:39:09 -04:00
upload_fixer.rb typo in error message 2018-08-10 11:34:01 +10:00
upload_recovery.rb Fix UploadRecovery from S3 fails with bucket name containing sub-folder. 2018-10-01 20:22:15 +08:00
url_helper.rb FIX: store the topic links using the cooked upload url 2018-08-14 12:23:32 +02:00
user_name_suggester.rb FIX: don't raise an error on integer usernames 2018-09-10 22:17:56 +05:30
version.rb Version bump to v2.1.4 2018-11-29 11:16:23 -05:00
wizard.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00