You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First several calls are above 1 second for me (python 3.6 on OS X):
In [1]: import dateparser
In [2]: %time dateparser.parse('not a date')
CPU times: user 1.94 s, sys: 99.2 ms, total: 2.04 s
Wall time: 2.13 s
In [3]: %time dateparser.parse('not a date')
CPU times: user 1.32 s, sys: 7.37 ms, total: 1.32 s
Wall time: 1.33 s
After some time it goes down to 150 -- 200 ms, which is still quite slow:
In [6]: %time dateparser.parse('not a date')
CPU times: user 145 ms, sys: 2.08 ms, total: 147 ms
Wall time: 152 ms
In [7]: %time dateparser.parse('not a date')
CPU times: user 147 ms, sys: 2 ms, total: 149 ms
Wall time: 153 ms
The text was updated successfully, but these errors were encountered:
looks like it's possible to make it about 10x-20x faster, and have just the first run slow, by fixing how caching is performed in the dictionary module, and being smarter about stripping the tz (pop_tz_offset_from_string), which is done for every language (it's quite slow), and a locale is checked even if result is the same.
First several calls are above 1 second for me (python 3.6 on OS X):
After some time it goes down to 150 -- 200 ms, which is still quite slow:
The text was updated successfully, but these errors were encountered: