{"id":31655543,"url":"https://github.com/llogick/extended-zccs","last_synced_at":"2025-10-07T13:15:28.574Z","repository":{"id":317649312,"uuid":"1046673155","full_name":"llogick/extended-zccs","owner":"llogick","description":"Extended Zig Compiler Components: Reduce parsing overhead by reusing data, e.g., in language servers.","archived":false,"fork":false,"pushed_at":"2025-10-02T05:51:08.000Z","size":7007,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"central","last_synced_at":"2025-10-02T07:22:43.644Z","etag":null,"topics":["parser","zig","zig-language","zig-language-servers"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llogick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T03:41:52.000Z","updated_at":"2025-10-02T05:51:11.000Z","dependencies_parsed_at":"2025-10-06T05:47:23.145Z","dependency_job_id":null,"html_url":"https://github.com/llogick/extended-zccs","commit_stats":null,"previous_names":["llogick/extended-zccs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/llogick/extended-zccs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogick%2Fextended-zccs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogick%2Fextended-zccs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogick%2Fextended-zccs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogick%2Fextended-zccs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llogick","download_url":"https://codeload.github.com/llogick/extended-zccs/tar.gz/refs/heads/central","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogick%2Fextended-zccs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278780091,"owners_count":26044499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","zig","zig-language","zig-language-servers"],"created_at":"2025-10-07T13:15:25.875Z","updated_at":"2025-10-07T13:15:28.569Z","avatar_url":"https://github.com/llogick.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Project Stage: Prototype - *Exploring structure, algorithms, and implementation. Everything is subject to change.*\n\n## Motivation\n\nThe standard Zig parser is no slouch,  \nbut it’s a full-document parser — reprocessing the entire document from scratch for every edit.\n\nThis becomes inefficient for frequent small edits, which this project aims to address through targeted optimizations.\n\n## Goals\n\nNOTE: **Uplift numbers** are based on small edits. Performance may vary for large-scale changes.\n\n- [x] G1: Reuse tokens\n\n    Achieves ~50% uplift (relatively flat latency regardless of edit location)\n\n- [x] G2: Reuse root declarations (part 1)\n\n    Reuse root declarations before the edit point, with performance gains increasing toward document end.\n    Achieves G1 + 0–45% uplift\n\n- [ ] G3: Reuse root declarations (part 2)\n\n    Reuse as many root declarations as possible.\n    Increased complexity (calculations/viability checks, 2 extra allocations, replace nodes range, shift indices) may lower G2’s uplift but provides a more consistent ~30–45% uplift over G1 across all edit locations\n\n- [ ] G4: Parse only affected nodes\n\n    High complexity. Aims to ensure flat latency across all edit locations for a G1 + 40% total uplift. \n\n- [x] Specialized AstCheck component\n\n    - Early Exit Support: Checks a thread-safe flag, `change_pending: *std.atomic.Value(bool)`,     \n      early in `generate()` and in the `container_decl.ast.members` loop in `structDeclInner()`    \n\n    - -= IMPORTANT =- Given that `AstCheck.generate()` may return early,   \n        **The `.instructions` field of the AstCheck result should always be treated as *undefined***\n\n    Given that AstCheck shouldn't be called when ast.errors.len != 0, the cases that benefit are:  \n    \n    - rapidly inserting new lines\n    - modifying existing identifiers, ie edits that don't introduce parse errors\n    - distant third: ast-check errors past the 50% mark of a large document\n\n## Try It Out\n\nTake [a tailored version of ZLS](https://github.com/llogick/zls/tree/zls-016-dev-faster-doc-edits) for a spin and discover if it enhances your editing experience    \n\n**Keep in Mind:**  \nHalf (50%) of a small number, is an even smaller number — for tiny files or on capable hardware, the speed-up might be imperceptible.  \n\n**Suggested Test Files:**\n- Your own project files / files you are familiar with\n- https://github.com/ziglang/zig/blob/master/src/Sema.zig\n- https://github.com/ziglang/zig/blob/master/src/codegen/x86_64/CodeGen.zig     \n    (will stress test your editor as well)\n\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nIt includes large portions of code from **Zig**, which is also released under the [MIT License](LICENSE-ZIG).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllogick%2Fextended-zccs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllogick%2Fextended-zccs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllogick%2Fextended-zccs/lists"}