Decrease size of js in Bitwarden web interface via moving large dictionaries to separate js files

Bitwarden web interface loads too slow. I lookup the network stats and see two large js files, loaded on every page: - 2.37 MB - 2.64 MB

I lookup to those files, and they contains large dictionaries, that used not on every page, at least those tho ones:

  • passwords (seems week passwords db) - 792 kb
  • EEFLongWordList - 78 kb

As I understand, those dictionaries are used only when user fill new password. So will be good to move them from main files to separate files, that will be lazy loaded on demand. This will increase web interface loading speed and decrease web app cpu load!

Also maybe some other functions, that used not on all pages, can be extracted from main js files and moved to separate files.