Skip to content

Potential Async Daemon Optimizations #4060

@jeremydmiller

Description

@jeremydmiller

See this discussion w/ @erdtsieck & @jeremydmiller on Discord: https://discord.com/channels/1074998995086225460/1074999076896112661/1455232139300831243

Problem: What if an async projection is needing to query against the events table with a sparse matching criteria? That's making the DB do a lot of scanning ahead and leading to smaller batches

Possible Ideas:

  • "opt in" indexes on event type. That comes up somewhat often. Want folks to understand that comes with a non-zero cost though on the write side
  • Some docs on tuning the async daemon that discuss moving the batch size down
  • Have the SubscriptionAgent pool up events that have been fetched, but not yet executed. Effectively combine EventPage that are staged. That gets us back to optimizing the throughput even if it's taking more queries to fetch events
  • Maybe try sending all event data back, but selectively reading events in memory based on event type. Don't deserialize events coming back if they don't match the requirements -- actually, not wild about this approach, but brainstorming here.
  • Maybe make the daemon fetching adjust based on the behavior? Like, could the daemon tune itself maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions