gristlabs_grist-core/app/client
Dmitry S 526a5df157 (core) Manage memory used for websocket responses to reduce the risk of server crashes.
Summary:
- Implements MemoryPool for waiting on memory reservations.
- Uses MemoryPool to control memory used for stringifying JSON responses in Client.ts
- Limits total size of _missedMessages that may be queued for a particular client.
- Upgrades ws library, which may reduce memory usage, and allows pausing the websocket for testing.
  - The upgrade changed subtle behavior corners, requiring various fixes to code and tests.

- dos.ts:
  - Includes Paul's fixes and updates to the dos.ts script for manual stress-testing.
  - Logging tweaks, to avoid excessive dumps on uncaughtError, and include timestamps.

Test Plan:
- Includes a test that measures heap size, and fails without memory management.
- Includes a unittest for MemoryPool
- Some cleanup and additions to TestServer helper; in particular adds makeUserApi() helper used in multiple tests.
- Some fixes related to ws upgrade.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3974
2023-08-07 11:28:31 -04:00
..
aclui (core) updates from grist-core 2023-07-17 01:22:18 -04:00
components (core) Manage memory used for websocket responses to reduce the risk of server crashes. 2023-08-07 11:28:31 -04:00
lib (core) Import redesign 2023-08-04 14:59:55 +02:00
models (core) updates from grist-core 2023-07-28 17:40:31 +02:00
ui (core) Adding links to description tooltips 2023-08-04 18:34:04 +02:00
ui2018 (core) Adding links to description tooltips 2023-08-04 18:34:04 +02:00
widgets (core) Adding links to description tooltips 2023-08-04 18:34:04 +02:00
app.css (core) Polish tutorial popups 2023-04-20 12:20:03 -04:00
app.js (core) i18 2022-09-29 18:02:09 +02:00
billingMain.ts (core) Add basic activation page to grist-ee 2022-08-23 10:30:52 -07:00
browserCheck.ts (core) On mobile, only show a warning for older and unknown browsers rather than for all 2023-06-01 11:15:21 -04:00
declarations.d.ts (core) Migrating commands to typescript 2023-04-24 09:48:40 +02:00
DefaultHooks.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
errorMain.ts (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
exposeModulesForTests.js support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
Hooks.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
logo.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
tsconfig.json (core) Migrate to SRP and add change password dialog 2022-03-16 21:35:06 -07:00