-
Notifications
You must be signed in to change notification settings - Fork 852
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
create 100 million object cost lot of time #663
Comments
Option-1you might want to run a profiler to see where the bottleneck is. (eg. visualVM, yourkit, jprofiler) the problem could be Option-2you can generate in parallel with something like this:
|
want to contribute for academic purpose |
hi @icytek I've just checked timing for your code (except For me it took about 40 min to generate 100M. (Linux64, jdk1.8) Also it could be parallelized as proposed by @wcarmon |
just for fun i added this as a benchmark to https://github.com/datafaker-net/datafaker it takes less than 10 min to generate these 100 million objects (jdk 17.0.5) in one thread |
Describe the bug
when i create 100 million object cost about 10 hour
To Reproduce
for (int i = 0; i < 100000000; i++) {
People person = new People();
person.setLevel(j);
person.setName(faker.name().fullName());
person.setCompany(faker.company().industry() + faker.company().buzzword());
person.setNation(faker.nation().nationality());
person.setPlace(faker.address().fullAddress());
person.setUniversity(faker.university().name());
person.setBlood(faker.name().bloodGroup());
person.setJob(faker.job().title());
person.setPhoneNum(faker.phoneNumber().cellPhone());
person.setBirthDay(DateUtils.get8DateString(faker.date().birthday().getTime()));
}
Expected behavior
create bigdata could be faster than now
Versions:
The text was updated successfully, but these errors were encountered: