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
Microsoft Visual Studio Professional 2019 Version 16.8.3
What locale are you using with Bogus?
english
What's the problem?
Taking too much time when the amount of data increases
What possible solutions have you considered?
Dont really know any solution since its an inbuilt thing
Do you have sample code to show what you're trying to do?
(Please be complete. Provide all code necessary to run your example in LINQPad.) (The more complete code examples are, the more accurate answers will be.) (https://www.linqpad.net)
The text was updated successfully, but these errors were encountered:
The short summary is, eventually all data will repeat. You'll have to define what uniqueness means to your application. Second, I'm not able to debug a screenshot of the posted code. So my help will be limited only to pointing out a few things you'll want to look into:
Avoid using .RuleFor( ___ , z => z.Person....).
Try commenting out various rules and see if you notice any improvement in performance. Most likely, the problem is the work Bogus is being asked to do with the lambdas (ie: _ => doWork...).
For example, suppose we are creating multiple users using bcrypt to produce passwords for user accounts. The bcrypt hashing process to produce passwords will be super slow if you include it in a Bogus' rule as shown below: .RuleFor( user => user.Password, f => CreateBcryptPassword(...)); // bcrypt is very slow.
One (or several) of the rules in the screenshot will most likely be the cause of the slowness; you'll have to investigate. Also, running the code through a profiler could help.
Check if the code is making any database calls or making calls to an external service. These kinds of things usually slow down Bogus too.
I'm going to close the issue, but feel free to carry on the conversation if you have any other questions, please feel free to ask and I'll be happy to help. Let me know if you find the issue.
Also, here are other similar issues that may help you find a solution:
Version Information
What locale are you using with Bogus?
english
What's the problem?
Taking too much time when the amount of data increases
What possible solutions have you considered?
Dont really know any solution since its an inbuilt thing
Do you have sample code to show what you're trying to do?
(Please be complete. Provide all code necessary to run your example in LINQPad.)
(The more complete code examples are, the more accurate answers will be.)
(https://www.linqpad.net)
The text was updated successfully, but these errors were encountered: