Go to file
Sahil Batra e23af20079 realm: Prefetch group settings only for "/register" response.
This commit updates code to prefetch realm group settings like
"can_create_public_channel_group" only when computing settings
for "/register" response by refetching the realm object with
select_related instead of fetching those settings in UserProfile
query.

This change is done because we do not need to prefetch these
settings for every UserProfile object and for most of the cases
where these settings are actually accessed, we can afford extra
query like when checking permission to create streams. But we
cannot afford one query extra for each setting when computing
these settings for "/register" response, so we re-fetch the
realm object with select_related leading to only one extra
query.

The query count changes in tests are -
- Query count increases by 1 when calling fetch_initial_state_data
for computing can_create_public_streams because Realm object from
UserProfile does not have prefetched setting fields.

- Query count increases by one in test_subs where streams are
created which is as expected due to the setting not being prefetched.

- Query count increases by 2 in tests in test_home.py where one
query is to refetch the realm object and one for computing
can_create_public_streams as mentioned above.
2024-06-16 11:55:28 -07:00
.github Revert "ci: Temporarily upgrade postgresql-client-common before upgrading." 2024-05-15 15:25:51 -07:00
.tx provision: Replace transifex-client with new transifex-cli. 2022-12-13 12:34:08 -08:00
.vscode
analytics models: Migrate ids of all non-Message-related tables to bigint. 2024-06-05 11:48:27 -07:00
api_docs api-changelog: Make feature level lines consistent with no colon. 2024-06-12 06:46:35 -07:00
confirmation models: Migrate ids of all non-Message-related tables to bigint. 2024-06-05 11:48:27 -07:00
corporate stripe: Use comma for collection method Literal values. 2024-06-10 16:10:42 -07:00
docs docs: Update #narrow links from stream->channel in hashchange-system.md. 2024-06-11 10:44:31 -07:00
help help: Update billing articles for current billing management features. 2024-06-13 07:00:39 -07:00
locale i18n: Update translation data from Transifex. 2024-06-08 18:22:30 -07:00
patches dependencies: Patch @types/plotly.js for exactOptionalPropertyTypes. 2024-05-16 08:58:20 -07:00
pgroonga migrations: Import BaseDatabaseSchemaEditor from its canonical module. 2023-03-05 14:46:28 -08:00
puppet process_exporter: Use -recheck-with-time-limit to catch process renames. 2024-05-30 22:24:53 -07:00
requirements requirements: Upgrade Python requirements. 2024-05-31 14:32:33 -07:00
scripts docs: Update CZO links from stream to channel in docs and comments. 2024-06-11 10:44:31 -07:00
static images: Update channels and topics images for revisions. 2024-06-13 06:51:54 -07:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-14 17:14:34 -07:00
templates help: Refer to automatic/manual "billing" as "license management". 2024-06-13 07:00:39 -07:00
tools postgresql-init-dev-db: Add missing quotes. 2024-06-16 11:36:58 -07:00
var/puppeteer
web refactor: Rename huddle to direct message group in web codebase. 2024-06-14 18:07:07 -07:00
zerver realm: Prefetch group settings only for "/register" response. 2024-06-16 11:55:28 -07:00
zilencer zilencer: Do not error on old stats which we no longer have. 2024-06-06 13:26:21 -04:00
zproject topic: Add resolve topic undo grace period. 2024-06-10 13:34:23 -07:00
.codecov.yml
.codespellignore codespell: Fix spelling mistakes caught by codespell. 2024-05-31 14:32:33 -07:00
.editorconfig editorconfig: Use [[shell]] section for shfmt options. 2024-02-22 16:36:16 -05:00
.eslintignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
.eslintrc.js eslint: Enable no-restricted-globals with confusing-browser-globals. 2024-06-07 16:10:39 -07:00
.gitattributes
.gitignore tsconfig: Enable composite. 2024-06-09 12:08:03 -07:00
.gitlint lint: Update line-length for commit message to 72 in gitlint. 2023-05-01 10:35:52 -07:00
.mailmap mailmap: Add entry for Rohan Gudimetla. 2023-12-13 13:28:19 -08:00
.npmignore
.npmrc dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.prettierignore marked: Fix type stub to declare marked as a CommonJS module. 2024-06-08 00:26:38 -07:00
.pyre_configuration
.readthedocs.yaml readthedocs: Add a configuration file. 2023-02-03 16:36:54 -08:00
.sonarcloud.properties
CODE_OF_CONDUCT.md docs: Rename "private message" -> "direct message". 2023-06-23 14:36:16 -07:00
CONTRIBUTING.md docs: Update CZO links from stream to channel in docs and comments. 2024-06-11 10:44:31 -07:00
Dockerfile-postgresql docs: Fix grammar errors found by mwic. 2023-10-09 13:24:09 -07:00
LICENSE
NOTICE
README.md docs: Update Ruff badge and links. 2023-10-26 15:51:46 -07:00
SECURITY.md docs: Update .html links pointing to "Upgrade Zulip" or "Modify Zulip". 2023-08-11 16:49:32 -07:00
Vagrantfile Upgrade development environment to Ubuntu 22.04. 2024-04-01 13:27:39 -07:00
dump.rdb stream-settings: Show indicator on notification settings. 2024-02-13 14:47:42 -08:00
manage.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
package.json dependencies: Add confusing-browser-globals. 2024-06-07 16:10:39 -07:00
pnpm-lock.yaml dependencies: Add confusing-browser-globals. 2024-06-07 16:10:39 -07:00
prettier.config.js
pyproject.toml partial: Replace returns plugin with an annotation. 2024-04-29 17:14:41 -07:00
stylelint.config.js dependencies: Upgrade JavaScript dependencies. 2023-07-21 15:58:42 -07:00
tsconfig.json tsconfig: Enable composite. 2024-06-09 12:08:03 -07:00
version.py settings: Remove create_public_stream_policy. 2024-06-10 12:24:45 -07:00

README.md

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage Ruff code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.