-
Notifications
You must be signed in to change notification settings - Fork 218
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
Performance regression after commit a57d499821375f3b239358f8bfac11bdfc68d06a #219
Comments
+1 |
I noticed that the tests of Faker
I split the output for ease of reading
So
|
Removed `Enum.to_list/1` call since `Enum.at/2` works fine with any enum. Fixes elixirs#213 and fixes elixirs#219.
Removed `Enum.to_list/1` call since `Enum.at/2` works fine with any enum. Fixes elixirs#213 and fixes elixirs#219.
Hi, please test 0.11.2 |
My tests are quick again with 0.11.2. Thank you! |
No worries. It's @aptinio & @elbow-jason who done the job. |
I found a x10 performance regression in the commit "Fixed: Faker.Util.pick/1 work with Enum type now" of October 4.
I have a test suite running in about 3 minutes with Faker 0.11.0 (both on my laptop, my coworkers laptops and on Travis)
After the upgrade to 0.11.1 the tests run in 30 minutes (again on our laptops and on Travis)
I traced back the regression to commit a57d499.
With the commit before that (Fixed: Faker.StarWars doctests - b3e933c) my tests still run in 3 minutes
but with a57d499 they run in half an hour.
I reverted the commit on my fork of Faker and configured
mix.exs
to use it. My tests run in 3 minutes again.Commit a57d499 replaced
with
I didn't benchmark
Enum.to_list/1
yet but it seems that the slow down is due to it.Faker's tests from the HEAD of master and my code keep working with the "list" version. Is the new version strictly necessary?
I tested with this code with no improvements (still 30 minutes). I verified it used both versions adding some
IO.puts
.I didn't check the implementation of
Enum.to_list/1
but maybe it returns immediately if the argument is a list (), so it's a no op in that case.Given the lack of test failures, are there some cases for the conversion from Enum to list is necessary?
The text was updated successfully, but these errors were encountered: