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

activity: when migrating, refresh summaries *once* #3570

Merged
merged 1 commit into from
Jun 5, 2024

Commits on Jun 5, 2024

  1. activity: when migrating, refresh summaries *once*

    Migration logic was calling into +update-index for each entry we
    imported, which in turn calls +refresh-summary. Of course, we know we'll
    likely be adding more things, so this is unnecessary (and slow) work.
    
    Here, we add an "importing" flag into the context, and set it to true
    for the duration of migration logic. The "should-notify" hidden
    parameter we had added to the +add arm previously gets replaced by this,
    and if it's set to true, we don't run +refresh-summary for every
    invocation of +update-index.
    
    This brings upgrade wall-clock time down from "idk, didn't finish in a
    reasonable timeframe" to a minute and a half, of which a full minute is
    spent on the activity agent's migration logic.
    
    We could probably bring that down further, or at least reduce variance,
    by capping the amount of events we add per channel. Unclear whether
    that's desirable or not. The change here feels like 80% of the solution,
    at least.
    Fang- committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    b442d8c View commit details
    Browse the repository at this point in the history