Decrease the blockstack.js bundle size

Hey, I am currently trying to reduce the bundle size for Sigle (but I think all the blockstack apps could do the same), the biggest part is coming from the blockstack.js npm module, I saw that there are some issues open to reduce the bundle size of blockstack.

I was wondering if it’s safe to remove all the bip39 wordlist. After browsing the source code it looks like it’s only used if you use the wallet class, otherwise it looks safe to remove it. Would be great if somebody can confirm that :smile:

Blockstack merged pr (inspiration): https://github.com/blockstack/blockstack.js/pull/683
My idea for Sigle: https://github.com/pradel/sigle/pull/63/files

2 Likes

Hi @leopradel,

I think it make sense. I did left you a comment on Github.

What is your main achievement to reduce the bundle, make it faster or easier to run and understand ?

As a user, for you i could understand for a personal deletion. But for other Users it might can still be useful i think.

What is your main achievement to reduce the bundle, make it faster or easier to run and understand?

The Blockstack library is actually really big, I want to deliver the best experience possible for the user, less JS shipped = faster loading time and a better experience for the user in general :slight_smile:

As a user, for you i could understand for a personal deletion. But for other Users it might can still be useful i think.

From my understanding, if you don’t need the wallet feature then it should be safe to remove it no?

1 Like

Yes, i haven’t look the code in details but aren’t these languages pack ? If you remove languages pack, other user might not be able to use it as they like to or want to.

This is nothing negative, just making sure about that point ?

I mean these are language pack coming from the bip39 package that blockstack is using under the hood

1 Like