-
Notifications
You must be signed in to change notification settings - Fork 156
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
1200% slower performance of next() and prev() upgrading to 4.6 from 2.3 #287
Comments
Hi @hueniverse! Thanks for reporting this. 12x performance degradation doesn't sound good indeed. I tested it briefly in my local environment and saw 3x - 5x slowdown, depending of the input expression. Individual However, I tested my main hypothesis and benchmarked
|
Thanks @harrisiirak. Lmk if I can help. |
Just a quick status update. I looked more in-depth at However, I think we can greatly reduce actual calls we're making to calculate/create new date objects during the iteration process. When the date is iterated, all the calculations happens in 1-step (second, minute, hour etc) interval increments/decrements. This is lazy approach and creates lots of unnecessary (which is bad for the performance) date related operations. The solution could be jump over all the date component values that we can't match anyway. I've created local POC but as expected, some of the tests are now failing - I'll look into this when I've a bit more time (and brainpower). |
@harrisiirak Do you have a status update on this issue? |
Sadly, I haven't had time to look into this issue further. |
@harrisiirak |
hi! sorry, any updates for this issue? |
We recently upgraded the module from 2.3.7 to 4.6.0 and saw a huge performance degradation. When calling the
next()
method 10000 times, our benchmark went from 5000ms to 68000ms. Will provide more info as we dig deeper.The text was updated successfully, but these errors were encountered: