Template parsing should happen at pack time
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 622
- Forks
- 8
- Avg merge
- 38m
- Merged PRs (30d)
- 1
Description
Given that zeroserve treats the tarball as an immutable backing store it can pick up some performance by pre-parsing all of the eligible files for template usage. For each file that contains a template:
* build a list containing the offset of the position of each template in the file and the name of the template key, removing the template data from the file
* store the list in `.zeroserve/template_maps`, keyed to the file's tar entry
Removing the template data from the source file allows us to serve the raw file without processing if we have no metadata. If we have metadata, then serving the file devolves into serving known-sized chunks from the backing store (calculated from the offset list), interspersed with known sized buffers of metadata.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the pack-time tar processing and the existing template detection or rendering logic. Trace how tar entries are stored and served, then define how template maps in `.zeroserve/template_maps` would connect those paths; done means eligible templates are pre-parsed and files can be served raw or from mapped chunks as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100