discourse/lib/tasks
David Taylor 9db5eafb15
PERF: Improve production JS build in low-memory environments (#26849)
- Use 'cheap-source-map' webpack config on low-memory machines

  This results in worse quality sourcemaps in browser dev tools, but it significantly reduces memory use in our webpack build. In approximate local testing it drops from 1100mb to 590mb. This should make the rebuild process on low-memory machines much faster and less likely to trigger OOM errors.

  In development, and on higher-memory machines, the higher-quality 'source-map' option is maintained.

- Disable Webpack's built-in `minimize` feature. Embroider already applies Terser after the webpack build is complete. There is no need to double-minimize the output.

- Update ember-cli-progress-ci to print to stderr instead of stdout. For some reason, pups (used by discourse_docker) buffers the stdout of commands and only prints when they are finished. stderr does not have this same limitation, so switching will mean sysadmins can see the progress of the ember build in real-time.

Given the number of variables it's hard to promise exact numbers. But, in my tests on a DO droplet with 1GB RAM (+2GB swap), this reduced the `ember build` portion of a `./launcher rebuild app` from ~50 minutes to ~15 minutes.
2024-05-02 11:43:59 +01:00
..
add_topic_to_quotes.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
admin.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
annotate.rake DEV: Extensively use exception: true in system() (#25911) 2024-02-27 11:33:28 +01:00
api.rake FEATURE: Hash API keys in the database (#8438) 2019-12-12 11:45:00 +00:00
assets.rake PERF: Improve production JS build in low-memory environments (#26849) 2024-05-02 11:43:59 +01:00
auto_annotate_models.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
autospec.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
avatars.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
backfill.thor DEV: Format .thor files (#23059) 2023-08-10 13:59:13 +02:00
categories.rake FIX: Update category tag stats with new or deleted (#21531) 2023-05-18 12:46:44 +03:00
cdn.rake DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
compatibility.rake DEV: Introduce rake task to validate discourse-compatibility file (#26158) 2024-03-13 13:57:41 +00:00
db.rake DEV: Extensively use exception: true in system() (#25911) 2024-02-27 11:33:28 +01:00
destroy.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
dev.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
docker.rake DEV: Support customizing docker:test:setup with envs (#24508) 2023-11-22 15:12:02 +08:00
documentation.rake DEV: Remove unmaintained tidy-jsdoc dependency (#25110) 2024-01-03 10:30:54 +00:00
emails.rake FIX: in EmailSettingsValidator, unset smtp authentication when there's no user and password 2024-04-19 14:02:22 -04:00
emoji.rake DEV: Remove direct minitest dependency to appease ruby-lsp (#26056) 2024-03-06 15:41:14 +00:00
export.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
groups.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
hashtags.rake DEV: Capture output in hashtags spec (#20773) 2023-03-23 11:47:14 +10:00
i18n.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
images.rake DEV: Upgrade to Rails 7 2022-04-28 11:51:03 +02:00
import.rake DEV: Import script should insert more data into user_stats table (#26551) 2024-04-11 14:05:21 +02:00
incoming_emails.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
integration.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
javascript.rake FIX: Better tracking of topic visibility changes (#26709) 2024-04-29 10:34:46 +10:00
log.rake FIX: whoops, linting 2020-09-03 12:10:11 +01:00
maxminddb.rake FIX: maxmind:refresh does not respect refresh_maxmind_db_during_precompile_days (#26457) 2024-04-02 14:25:05 +08:00
plugin.rake DEV: Suppress verbose command failure output in plugin:turbo_spec (#25952) 2024-02-29 14:35:31 +10:00
populate.rake DEV: Convert admin-incoming-email modal to component-based API (#22701) 2023-07-20 16:31:20 -05:00
populate.thor DEV: Format .thor files (#23059) 2023-08-10 13:59:13 +02:00
posts.rake DEV: Allow rebakes to generate optimized images at the same time 2024-01-16 14:33:16 +01:00
profile.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
qunit.rake DEV: Restore qunit 'tap' reporter, but collapse verbose output in CI (#26484) 2024-04-03 10:22:20 +01:00
redis.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
release_note.rake DEV: Add link to PR when generating release notes 2023-09-12 09:26:46 +02:00
revisions.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
rspec.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
s3.rake FEATURE: allow S3 ACLs to be disabled (#21769) 2023-06-06 15:47:40 +10:00
scheduler.rake FEATURE: call hub API to update Discourse discover enrollment. (#25634) 2024-02-23 11:42:28 +05:30
search.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
site_settings.rake DEV: Add rake command to help detect dead settings (#23300) 2023-08-29 09:42:52 -06:00
site.rake FEATURE: Add dark mode option for category backgrounds (#24003) 2023-10-20 12:48:06 +00:00
smoke_test.rake DEV: Extensively use exception: true in system() (#25911) 2024-02-27 11:33:28 +01:00
svg_icons.rake DEV: Extensively use exception: true in system() (#25911) 2024-02-27 11:33:28 +01:00
svg_sprites.rake DEV: Store theme sprites in the DB (#20501) 2023-03-14 13:11:45 -05:00
tags.rake DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
themes.rake FIX: themes:update rake task not rolling back transaction on error (#26750) 2024-04-25 15:19:23 +08:00
topics.rake FEATURE: do not bump topics when retroactively closing (#23115) 2023-08-16 11:20:47 +10:00
turbo.rake DEV: Fix bin/turbo_rspec runtime recording (#20407) 2023-02-23 07:47:11 +10:00
typepad.thor DEV: Format .thor files (#23059) 2023-08-10 13:59:13 +02:00
uploads.rake DEV: Rename with_secure_uploads? to should_secure_uploads? on Post (#26549) 2024-04-09 13:23:11 +10:00
users.rake DEV: Add task to anonymize user data (#20522) 2023-10-03 16:59:43 +08:00
version_bump.rake DEV: Don't create backups during version bumps (#25484) 2024-01-30 11:41:15 -07:00