You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/04/04 15:35:33 UTC
[GitHub] [incubator-doris] HangyuanLiu opened a new issue #3263: [Proposal]
Use Google/CCTZ to replace boost at timezone function
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] imay commented on issue #3263: [Proposal] Use
Google/CCTZ to replace boost at timezone function
Posted by GitBox <gi...@apache.org>.
imay commented on issue #3263: [Proposal] Use Google/CCTZ to replace boost at timezone function
URL: https://github.com/apache/incubator-doris/issues/3263#issuecomment-610148536
It seems wonderful. Could you introduce it to Doris?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] HangyuanLiu commented on issue #3263: [Proposal]
Use Google/CCTZ to replace boost at timezone function
Posted by GitBox <gi...@apache.org>.
HangyuanLiu commented on issue #3263: [Proposal] Use Google/CCTZ to replace boost at timezone function
URL: https://github.com/apache/incubator-doris/issues/3263#issuecomment-610151446
OK
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org