Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Dispute notice on order edit page is slow #7163

Open shendy-a8c opened 1 year ago

shendy-a8c commented 1 year ago

Describe the bug

As reported here: p1694347746794979-slack-C03LA109BKM, stores with high number of disputes experience long delay before showing the dispute notice.

I think we need to investigate whether useCharge() call here results in slow database query in server.

Also, if useCharge() can potentially cause slowness, we need to make sure such call in other places does not cause the same problem.

To Reproduce

  1. Have high number of disputes.
  2. Purchase a product with card 4000000000000259 that will generate dispute right after.
  3. Open the order and notice the long delay before the dispute notice shows up.
zmaglica commented 1 year ago

This issue impacts disputes, so assigning to Helix (based on team responsibilities Pc2DNy-3z-p2) @haszari . Assigning as part of Gamma Triage process PcreKM-yM-p2.

Jinksi commented 10 months ago

Moving this to the backlog while we gather more information about the problem via the tracks event introduced in #7437 – will help us determine if we still need to improve the performance or change how we deliver the message.

haszari commented 9 months ago

This is not a high priority issue. Before taking action here we need to be clear (and aligned) on what stores are affected, and how much they are affected.

Downgrading to medium, though this may be low priority once we understand the impact.

Jinksi commented 9 months ago

What's the performance penalty on displaying the notice (i.e. time to display for 1-10 disputes vs. for many)?

FYI for whoever explores this: some measurements of performance for a high-dispute-count-store (WCCOM) were included in PR #7174.