Optimize webhooks JSON with compact format and string interning
- Convert params to compact array format (type-based dispatch) - Intern duplicate property names into string table - Use negative indices for object references to distinguish from string indices - Rename objects.json → webhooks.objects.json, add webhooks.strings.json - Move event filters to JSON for maintainability - Add CI validation job to verify optimization correctness Reduces combined minified size by ~67% (453 KB → 148 KB), ~27% gzipped (23 KB → 17 KB).
This commit is contained in:
+5
-4
@@ -7,7 +7,8 @@ node_modules
|
||||
# Minified JSON (generated at build time)
|
||||
*.min.json
|
||||
|
||||
# Intermediate JSON for size comparison (generated by update-webhooks --all)
|
||||
*.all.json
|
||||
*.drop.json
|
||||
*.strip.json
|
||||
# Full webhooks source (generated by update-webhooks, used for validation tests)
|
||||
*.full.json
|
||||
|
||||
# Validation marker (generated by tests)
|
||||
*.validation-complete
|
||||
|
||||
Reference in New Issue
Block a user