perf: add 5s timeout + dedup to geo2 fetch, remove redundant fallback…#6207
Closed
mokimo wants to merge 1 commit into
Closed
perf: add 5s timeout + dedup to geo2 fetch, remove redundant fallback…#6207mokimo wants to merge 1 commit into
mokimo wants to merge 1 commit into
Conversation
… call geo2.adobe.com/json/ was fetched with no timeout (browser TCP timeout ~30s) and no deduplication — concurrent callers each started an independent fetch. resolveDetectedMarketCountry() compounded this by making a second serial geo2 attempt on failure, meaning a blocked geo2 could cost 60s total. Changes: - geo.js: wrap fetch in AbortController with 5s timeout; cache the in-flight promise so concurrent calls share one fetch instead of each issuing a duplicate request - utils.js: remove the redundant getAkamaiCode() fallback block from resolveDetectedMarketCountry() — getCountry() already tried geo2 and returned null, an immediate retry will have the same result lana.js loading late is a symptom, not a cause: it lazy-loads on the first window.lana.log() call, which fires when geo2 times out. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
Contributor
Author
|
Closed in favor of #6210 |
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.
… call
geo2.adobe.com/json/ was fetched with no timeout (browser TCP timeout ~30s) and no deduplication — concurrent callers each started an independent fetch. resolveDetectedMarketCountry() compounded this by making a second serial geo2 attempt on failure, meaning a blocked geo2 could cost 60s total.
Changes:
lana.js loading late is a symptom, not a cause: it lazy-loads on the first window.lana.log() call, which fires when geo2 times out.
Resolves: MWPW-NUMBER
Test URLs: