Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: remove person join from actors modal #26623

Merged
merged 11 commits into from
Dec 9, 2024

Conversation

aspicer
Copy link
Contributor

@aspicer aspicer commented Dec 3, 2024

Problem

Person modals are failing for some teams with a lot of people for OOM

I was able to fix this by changing the join mode, but this made it slow.

Changes

If we do not request any fields that require joining against persons or groups, don't do it. Just return ids. The actors modals just take the IDs and hydrate the people, so this join is superfluous.

Remove the "created at" field from the actor modal.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Tested locally. Made unit tests pass.

@posthog-bot
Copy link
Contributor

Hey @aspicer! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Size Change: 0 B

Total Size: 1.11 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.11 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@aspicer aspicer force-pushed the move-person-modal-filters-down branch from 07929e6 to 1320bac Compare December 5, 2024 23:36
@aspicer aspicer requested a review from a team December 6, 2024 10:20
@aspicer aspicer enabled auto-merge (squash) December 6, 2024 11:24
ast.Constant(value=1),
],
select_from=ast.JoinExpr(table=ast.Field(chain=["persons"])),
where=None,
order_by=[ast.OrderExpr(expr=ast.Field(chain=["created_at"]), order="DESC")],
order_by=[ast.OrderExpr(expr=ast.Field(chain=["id"]), order="ASC")],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to have an order_by clause for just ids?
Guessing we add it by default here

Copy link
Contributor

@anirudhpillai anirudhpillai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@aspicer aspicer merged commit 4a56994 into master Dec 9, 2024
106 checks passed
@aspicer aspicer deleted the move-person-modal-filters-down branch December 9, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants