moneybutton / bsv

Bitcoin SV javascript library
Other
205 stars 107 forks source link

huge memory usage when building a transaction in browser env #252

Open zhfnjust opened 2 years ago

zhfnjust commented 2 years ago

building some transaction with large script like below cause a huge memory usage : https://classic-test.whatsonchain.com/tx/5c9fc415c7791d528be0cc715ac893786d2f42098fd7f6b3a79906e4d39d000c

Can we optimize the code to reduce memory usage

image
mathiasrw commented 2 years ago

You should avoid signing large transactions in the main thread, and instead use webworkers to do the heavy lifting.