-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation + some RegEx cause very slow generation #292
Comments
Hi Ivan, thanks for reporting this. RandomBeans uses https://github.com/DiUS/java-faker which uses https://github.com/mifmif/Generex to generated data based on regular expressions. Therefore this issue should be reported at https://github.com/mifmif/Generex Thanks! Edit: Noticed you have already done that, in mifmif/Generex#43 |
@PascalSchumacher Thank you for the answer! After a bit more research I found the Generex and opened an issue there. I'll close this now. |
Seems like the project you depends on is dead. Would you maybe consider, moving to another one for generating regepx? Because it is unusable in the current state with such slow generation. On my side it simply never reach the end. |
@ghilainm Definitely yes, do you know any good alternative? |
Unfortunately no! If I come across that I keep you informed. |
Hello guys,
I noticed a case where generation of beans is very slow (almost a minute for one bean). That happens when beans use validation + regex, like this:
@Pattern(regexp = "(.{1,6})( *, *(.{1,6})){0,15}")
I use random-beans 3.7.0 and Hibernate validator 6.0.7.I attached a minimal gradle/IntelliJ project which demonstrates the issue.
RandomBeansRegExIssue.zip
Now I am perfectly aware that people can create all sorts of nasty regexes and that's probably impossible to quickly generate a string which satifies them. Yet I hope that it's possible to speed up generation for some cases.
If you need any more info, help or whatever please contact me. Thank you!
The text was updated successfully, but these errors were encountered: