Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Replace bobjects with LazyMessages #622

Merged
merged 2 commits into from Apr 24, 2021
Merged

Conversation

defunctzombie
Copy link
Contributor

Remove separate "bobjects" code paths and provide lazy messages using the existing messages code paths.

@@ -589,8 +583,8 @@ export default class SceneBuilder implements MarkerProvider {
this.collectors[topic]!.addMarker(marker as any, name);
}

_consumeMarker(topic: string, message: BinaryMarker | BinaryInstancedMarker): void {
const namespace = message.ns();
_consumeMarker(topic: string, message: BaseMarker): void {
Copy link
Member

Choose a reason for hiding this comment

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

There is also an _addMarker function that is substantially identical. I think only one of these two functions should survive the 🔪

@@ -369,7 +366,7 @@ export default class RandomAccessPlayer implements Player {
this._end,
);

const { parsedMessages: messages, bobjects } = await this._getMessages(start, end);
const { parsedMessages: messages } = await this._getMessages(start, end);
Copy link
Member

Choose a reason for hiding this comment

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

should we be renaming this parsedMessages field to lazyMessages or just messages?

@@ -469,7 +461,7 @@ export default class RandomAccessPlayer implements Player {
);
return undefined;
}
if (!topic.datatype) {
if (topic.datatype === "") {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this is a bad type def - it seems unlikely that someone would have an empty string, more likely that it would be missing, but I'm guessing that the type defs don't allow it to be missing.

app/players/Ros1Player.ts Outdated Show resolved Hide resolved
@defunctzombie defunctzombie force-pushed the roman/hocho-bobjects branch 5 times, most recently from 760fdfb to 433a07e Compare April 23, 2021 01:49
@defunctzombie defunctzombie marked this pull request as ready for review April 23, 2021 01:57
RewriteBinaryDataProvider is removed and logic in MemoryCacheDataProvider
is updated to produce lazy messages into blocks.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants