HangyuanLiu opened a new issue #3263: [Proposal] Use Google/CCTZ to replace boost at timezone function URL: https://github.com/apache/incubator-doris/issues/3263 ### Why Recently, we found that the function related to the time zone was running slowly . Issue is #3256 #3179 After investigation, there are two main reasons 1、boost::posix performance is slow 2、To calculate 64-bit timestamps, I patch pr #3069. But boost doesn't support 64-bit timestamps. So I used a cumulative method to calculate the time, which caused the date beyond 2038 to run extraordinary slowly. ### How Google/CCTZ was chosen as new timezone database to replace the previous libc / boost solution ### Google/CCTZ - Support int64 timestamp - great performance in multithreaded environment - very simple to use - builds upon the chrono library - Apache license ### Test performance from_unixtime(570672000, TimezoneDatabase::default_time_zone); Google/CCTZ : 0.029873s (Run 100000 times) Boost :0.248195s (Run 100000 times ) from_unixtime(253402271999L, TimezoneDatabase::default_time_zone); Google/CCTZ : 0.031212s (Run 100000 times) . The same performance as int32 timestamp Boost :6.96041s(Run **10** times) this timestamp is 64 bit,so we mush cumulative int32 to the timestamp to calculate timestamp.So the performance is extraordinary slowly.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
