Skip to content

Conversation

@danielballan
Copy link
Member

This ports a utility that we used for the FXI experiment from my gist to event-model.

The test shows that this does not work with event_page. Need some thought.

burst: bool, optional
If True, emit as fast as possible, ignoring timing. False by default.
"""
DOCUMENTS_WITHOUT_A_TIME = {'datum', 'datum_page', 'resource'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a list. Why the curly braces?

Copy link
Contributor

Choose a reason for hiding this comment

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

Micro-optimization to use a set instead of a list. It make the init a bit slower, makes x in DOCUMENTS_WITHOUT_A_TIME a bit faster. Removes the [n] access because there are no meaningful semantics in the order of these values.

@tacaswell
Copy link
Contributor

Hmm, maybe we should take a time window to batch stuff into, an N to batch into, or just always break the pages up into individual events?

@danielballan
Copy link
Member Author

We have code in databroker that joins events across streams, subdividing pages only as necessary to ensure monotonic time. I think it would take more than trivial effort to factor it out, but that seems like the right path here. We want that code to be available widely.

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