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 is slow on Blazor WASM #484

Closed Daniel-SchaeferJ closed 1 year ago

Daniel-SchaeferJ commented 1 year ago

Version Information

Software Version(s)
Bogus NuGet Package 34.0.2
.NET Core? X
.NET Full Framework?
Windows OS? X
Linux OS?
Visual Studio?

What locale are you using with Bogus?

What is the expected behavior?

When using the Generate(n) function for a given object, it shouldn't take that long to generate objects

What is the actual behavior?

Incredibly slow generation time of complex objects (100 properties or so)

Please provide a stack trace.

Any possible solutions?

I tested this both in xunit, blazor serverside, and web api and they all ran as fast as one should expect.

How do you reproduce the issue?

Create a project on blazor wasm and create a simple object and use Generate()

Do you have a unit test that can demonstrate the bug?

Can you identify the location in Bogus' source code where the problem exists?

If the bug is confirmed, would you be willing to submit a PR?

Yes or No?

Daniel-SchaeferJ commented 1 year ago

Seems to be isolated to autobogus