Comments (8)
I've tested it in multiple environments including entirely new projects. I've also used the node max_old_space_size env with as much as 8GB of ram (It should be noted that it isn't the browser tab that crashes, it's the actual dev process).
The problem isn't some absolute minimum memory footprint - but that like I've mentioned, regardless of the initial max memory constraint, the usage just immediately skyrockets and keeps climbing until hitting the max and crashing the process. This seems to actually stem from a real memory leak that has something to do with webpack-dev-server interop, as running the module in a simple node project (not CRA, just plain old node), causes no problems.
It should also be noted that this hasn't happened to me with the original zxcvbn package, just with zxcvbn-ts.
from zxcvbn.
I don't think it is a direct issue with zxcvbn-ts because it will already crash if you only import the password.js file into a fresh repo. The content of this file is only one variable with a big array.
But it seems like the approach from the original repo is more fit for big data like that. In the original repo those dictionaries are not an array but a string that is splitted on runtime.
I thought it would be a good idea to directly use an array to increase runtime performance but it seems like this comes with a downside for some dev servers 🤔
I will adjust the dictionaries so that they match the original initalization with the split function.
Thanks for the finding 👍
from zxcvbn.
I just release version 1.0.0 with this issue included. In my starter setup for CRA4 it worked now. Can you try it out for youself?
from zxcvbn.
You need to be aware that the dictionaries are huge there are 2MB of plain old json data.
I can say for myself that i never encountered this issue but i am using vue and nuxt instead of react. On the other side im using webpack for vue and nuxt too.
Does this happen for a new project or do you included it into a bigger project?
from zxcvbn.
This is weird, there are no functions that could go into a memory leak but i will check it out 🤔
Wich version are you using?
from zxcvbn.
I'm using the latest version. Another thing to add is that both JS and TS templates of CRA crashed for me, on different computers as well.
from zxcvbn.
Interesting! Thank you.
from zxcvbn.
It seems to work now - thank you very much.
from zxcvbn.
Related Issues (20)
- Guesses value is higher than it should be when the l33t matcher uses a replacement of multiple symbols to one HOT 1
- L33t scoring is incorrect for multisymbol substitutions HOT 2
- Regex matcher returns only first match HOT 1
- For randomly generated inputs, the value of guessesLog10 is incorrectly equal to the length of the string. HOT 2
- Make time estimate and scoring thresholds configurable HOT 2
- Separator scoring isn't used
- One of the directions gets less turns and guesses in spatial matcher HOT 1
- Consider adding base to output HOT 1
- @zxcvbn-ts/matcher-pwned crypto error HOT 6
- Typing issue HOT 2
- Performance drop because of the new l33t matcher
- Small error in documentation
- Language sources not working anymore
- Not recognizing dictionary words when multiple dictionaries are used HOT 1
- repeat matcher is causing repeat characters to be tested in other matchers HOT 2
- [FR]: Ability to configure the execution order of the matchers HOT 2
- User input doesn't affect the scoring HOT 4
- Proposal: Reduce the dictionary size footprint HOT 2
- "Matcher pwned already exists" warning message issue HOT 1
- Incorrect score for the string "password" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zxcvbn.