Ship PR #958 by @dazzling-no-more. CodeFull.gs now resolves DNS candidates in two passes, using one CacheService.getAll(keys) lookup per tunnel batch and reusing successful DoH answers inside the same batch. Long qnames now get SHA-256 cache keys instead of skipping cache, while parse/DoH failures still fall back to the tunnel-node path. Verification: - node assets/apps_script/tests/edge_dns_batch_test.js - node assets/apps_script/tests/edge_dns_test.js - cargo test --lib - cargo build --release - cargo build --bin mhrv-rs-ui --release --features ui
2.7 KiB
• بهینهسازی Full mode Apps Script: batch کردن Edge-DNS cache lookupها (PR #958 by @dazzling-no-more). مسیر CodeFull.gs قبلاً برای هر DNS query داخل batch یک CacheService.get جداگانه میزد. روی batchهای شلوغ، همین چند round-trip داخلی به CacheService میتونست latency بسازه، مخصوصاً وقتی چند lookup مشابه پشت سر هم میاومدن. حالا DNS candidateها در دو pass پردازش میشن: اول همه keyها جمع میشن، بعد یک cache.getAll(keys) برای کل batch انجام میشه، و جوابهای DoH موفق هم داخل همان batch دوباره استفاده میشن تا query تکراری دوباره به resolver نخوره.
• مسیر امن fallback حفظ شده. اگر CacheService خطا بده، DoH هنوز از داخل شبکه Google انجام میشه ولی cache.put غیرفعال میمونه؛ اگر parse/DoH شکست بخوره، همان op مثل قبل به tunnel-node forward میشه. qnameهای خیلی بلند هم بهجای skip شدن، با SHA-256 زیر namespace جداگانه cache میشن تا محدودیت ۲۵۰ کاراکتری key در CacheService شکسته نشه. هیچ config migration یا تغییر سمت client لازم نیست؛ فقط CodeFull.gs جدید را deploy کنید.
• The safe fallback behavior is preserved. If CacheService fails, DoH still runs from inside Google's network but cache.put is skipped; if parse/DoH fails, the op falls back to the existing tunnel-node forward path. Very long qnames now use a SHA-256 cache key under a separate namespace instead of skipping cache entirely, keeping keys below CacheService's 250-character limit. No client config migration is required; deploy the new CodeFull.gs.