Repository navigation
feat(khifile): partition client and server intern pools into dedicated chunks - #893
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 20, 2026 07:23
Contributor
There was a problem hiding this comment.
Code Review
This pull request partitions the interning pool into client-facing and server-only chunks (Type 6) to optimize frontend memory usage and initial load times. The backend now writes these pools separately, and the frontend parser has been updated to skip server-only chunks without performing decompression. A review comment correctly identified an issue in the frontend parser where skipping chunks prevents the chunkIndex from being incremented, which would lead to incorrect chunk indices in decode error reports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partitions the interning pool data in KHI file format v6 into client-facing and server-only chunks, and updates the frontend parser to skip server-only chunks without decompressing them.
Background & Motivation
With the introduction of the Workbench service, detailed log bodies, manifests, and structured values (
InternedStruct,FieldPathSet) are processed on demand on the server rather than on the frontend client. In the previous design, all interned strings and struct schemas were combined inChunkTypeInternPool(Type 2), forcing the browser to decompress and parse large amounts of server-only structured data during initial loading.By splitting the pool into:
ChunkTypeInternPool(Type 2): Client-facing strings (timeline names, log summaries, revisions, annotations)ChunkTypeServerInternPool(Type 6): Server-only strings,FieldPathSet, andInternedStructand updating the frontend
BinaryReaderandKHIFileParserto skip unhandled chunks without decompressing gzip payloads, we achieve:1..N).Key Changes
pkg/model/khifile/v6):NewIDGenerator()constructor andNewServerInternPool()helper delegating string lookups to parent pool.ServerStringIDBase = 0x80000000forIDServerStringto eliminate collision with client string IDs.Buildernow outputs client strings toChunkTypeInternPool(2) and server strings/field path sets/structs toChunkTypeServerInternPool(6).ChunkTypeInternPoolandChunkTypeServerInternPool.web/src/app/parser/core):BinaryReader: AddedreadChunkHeader()andskipChunkPayload(size)to allow skipping chunk bodies without gzip decompression.KHIFileParser: Skips unknown/unregistered chunk types (e.g.ChunkTypeServerInternPool) during ingestion.docs/en/architecture/khi-file-format.mdanddocs/ja/architecture/khi-file-format.md.BinaryReaderandKHIFileParserin Angular/TS.Verification
make test-gopassed.make test-webpassed.make lint-go/make lint-webpassed.