Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] Stripe settings page load #3692

Open
annemirasol opened this issue Jan 7, 2025 · 1 comment
Open

[Performance] Stripe settings page load #3692

annemirasol opened this issue Jan 7, 2025 · 1 comment

Comments

@annemirasol
Copy link
Contributor

annemirasol commented Jan 7, 2025

The Stripe settings admin page has been identified in pcShBQ-2J3-p2 as having a slow response time.

During my initial investigation, server response was consistently > 2s on a bare JN site:
Image

Part of the slowness looks like it's due to retrieving the merchant's account information from Stripe. We always do a fresh retrieve on page load, and cache the data for subsequent, same-request queries.

Next step: Investigate if there are further performance improvements we can do for this page.
Request URL: wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe
Context: pcShBQ-2J3-p2

Image
@malithsen
Copy link
Contributor

Next step: Investigate if there are further performance improvements we can do for this page.

The three requests to Stripe that we do on page load appear to be the most significant contributors to page load performance.

As @annemirasol noted above, one of them is made to retrieve account data. Other two are made to retrieve the two Oauth URLs (test and prod).

Image

I am not certain if these URLs can be cached. If not, for merchants who have already connected the Stripe account, these URLs are used in the "Configure connection" modal. One possible optimization could be to avoid retrieving them during the page load, instead get them through an API call only when the user opens the modal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants