lnbits / satspay

Create onchain and LN charges
MIT License
8 stars 4 forks source link

[Feature Request] speed up checkout dialog #25

Closed bitkarrot closed 1 year ago

bitkarrot commented 1 year ago

Hi! - Satspay is one my favorite Extensions, thank you much for writing it.

However, the number one end user complaint I get is how long it takes for the timed dialog box and QR code to load. On a fast network connection it is no problem, other times it can be very slow and delayed.

I only took a brief look at the code and i see there is a mempool.js that has to remote load, is this possible cause of the slow down? Is there some way to speed this up as an option?

Thanks in advance.

Screenshot 2023-10-10 at 4 50 08 PM
motorina0 commented 1 year ago

image

dni commented 1 year ago

i feel like the biggest part is quasar and vue which is still needed, not quite sure if it will bring that down significantly.

but as bitkarrot suggested, i think the problem is mempool.js from a cdn, i noticed some cdns are not really reliable especially when your geolocation is very different from your lnbits server. that is what i would suggest. include it into static

motorina0 commented 1 year ago

From the screenshot one can see that:

Which one should we optimize?

@bitkarrot can you please share the browser network stats on your side please

motorina0 commented 1 year ago

On a second thought I think @dni is right. mempool.js should be served as an extension resource.

talvasconcelos commented 1 year ago

Does this mean it should go on core and be part of the bundle?

added in lnbits/satspay#23

bitkarrot commented 1 year ago

@motorina0 this is what i see on a business network connection

Screenshot 2023-10-12 at 2 55 11 PM
dni commented 1 year ago

320ms :D but mempool.js was cached

motorina0 commented 1 year ago

Handled here: https://github.com/lnbits/satspay/pull/26