You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this analyzer, cozy-keys-lib's bundle takes 426 Ko.
We could gain some space by removing heavy and dispensable libs, typically node-forge or tld.js.
Previous work like #43 already improved the weight, although not everything went as planned: #73
node-forge (which can actually be used in browser, despite the name) is used for two things:
support for old browsers that does not have subtle crypto API, such as IE or old Safari
"fast" crypto operations, brought by this commit. It is unclear how it is fast compared to the subtle API and how useful it actually is
The 1. does not seem to be a problem, as we officially does not support IE, and only support Safari >=12, which support subtle API. About 2., this require to keep most of the existing node-forge imports, but newer jslib's versions seem to remove this need.
The text was updated successfully, but these errors were encountered:
Do you have an idea of how much weight we can save?
but newer jslib's versions seem to remove this need.
The methods you linked have not been edited for 4 years 🤔
cozy-keys-browser is using a recent jslib version from july 2021. cozy-pass-web is using one from may 2021.
Maybe it would be a good idea to update cozy-keys-lib's one. Also I may need to do it soon if I expect to mutualise recent changes from cozy-keys-browser and cozy-pass-web.
According to this analyzer, cozy-keys-lib's bundle takes 426 Ko.
We could gain some space by removing heavy and dispensable libs, typically node-forge or tld.js.
Previous work like #43 already improved the weight, although not everything went as planned: #73
tldjs is used to get the domain which can be easily reimplemented in a stub see its definition
node-forge (which can actually be used in browser, despite the name) is used for two things:
The 1. does not seem to be a problem, as we officially does not support IE, and only support Safari >=12, which support subtle API. About 2., this require to keep most of the existing node-forge imports, but newer jslib's versions seem to remove this need.
The text was updated successfully, but these errors were encountered: