bchavez / Bogus

:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Other
8.62k stars 491 forks source link

Bogus super slow #480

Closed vmachacek closed 1 year ago

vmachacek commented 1 year ago

I have those 18 fakers connected to each other https://gist.github.com/vmachacek/cb757a9c7ef3097865b9c54d7c6fd0fa and I wanted to use this to generate fake content for benchmark and I was surprised how slow it was. Generating 10 schedules would take 14 sec. That kinda defeats the purpose of the benchmark because generation alone would take so much time it could skew the results

Version Information

Software Version(s)
Bogus NuGet Package 34.0.2
.NET Core? net7.0
.NET Full Framework? nope
Windows OS? Windows 11 Home 22H2
Linux OS?
Visual Studio? JetBrains Rider 2023.2 EAP 6

What locale are you using with Bogus?

default

What is the expected behavior?

bogus would be faster

What is the actual behavior?

bogus is slow - 100 items generated in ~30 sec

is this normal, or im doing something stupid?

vmachacek commented 1 year ago

i rewrote it into this https://gist.github.com/vmachacek/98d8c7bcc5ef10c28d52cea8d2532e8b and that helped a bit