Empower The IOTA Payment Module with WebAssembly
The full article was originally published by Huhn on Medium. Read the full article here.
We try to improve the user experience of the IOTA Payment Module, which runs in the back of the einfachIOTA Magazine shop. I want to use some WebAssembly to reduce the loading time after pressing the “Pay with IOTA” Button.
Three Example Calls
POST /api/pay_with_iota 684.710 ms
Time for generateAddress 536 ms
POST /api/pay_with_iota 605.541 milliseconds
Time for generateAddress 582 ms
POST /api/pay_with_iota 200 701.732 ms
Time for generateAddress 592 ms
The blue overlay shows the loading time. It’s huge loading time and not good user experience. We see that generateAddress is the bottleneck here. Let’s see, if we can improve it with WASM!
POST /api/pay_with_iota 315.631 ms
Time for generateAddress 180 ms
POST /api/pay_with_iota 295.216 ms
Time for generateAddress 185 milliseconds
POST /api/pay_with_iota 298.396 ms
Time for generateAddress 187 ms