Skip to content

Implemented functions to copy a domain store data to the other worker with SharedArrayBuffer#757

Draft
kyasbal wants to merge 2 commits into
GoogleCloudPlatform:epic/file-schema-v6from
kyasbal:push-qklvryrqtpoy
Draft

Implemented functions to copy a domain store data to the other worker with SharedArrayBuffer#757
kyasbal wants to merge 2 commits into
GoogleCloudPlatform:epic/file-schema-v6from
kyasbal:push-qklvryrqtpoy

Conversation

@kyasbal

@kyasbal kyasbal commented Jun 12, 2026

Copy link
Copy Markdown
Member

This PR introduces several methods on domain stores. Methods like getSharedData implemented each domain store creates transferable object from the store and implemented another contructor to initialize stores from the shared data.

These changes are base of up coming WebWorker based search approach.

@kyasbal kyasbal added this to the KHI file format v6 milestone Jun 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the domain stores (InternPoolStore, LogStore, and TimelineStore) to use SharedArrayBuffer (with ArrayBuffer fallback) for efficient shared memory structures, enabling transferability to WebWorkers. It configures COOP and COEP headers in Angular and Karma to support this, updates store instantiations to use static factory methods, and adds comprehensive tests. The review feedback suggests optimizing data sharing in TimelineStore by retaining timelineRevisionIds and timelineEventIds as Uint32Array arrays instead of converting them to standard arrays, thereby avoiding unnecessary allocations and serialization overhead.

Comment thread web/src/app/store/domain/timeline-store.ts
Comment thread web/src/app/store/domain/timeline-store.ts
Comment thread web/src/app/store/domain/timeline-store.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant