dongjoon-hyun commented on code in PR #2422: URL: https://github.com/apache/orc/pull/2422#discussion_r2383899102
########## c++/src/Timezone.cc: ########## @@ -734,14 +750,26 @@ namespace orc { * Get a timezone by absolute filename. * Results are cached. */ - const Timezone& getTimezoneByFilename(const std::string& filename) { + const Timezone& getTimezoneByFilename(const std::string& dir, const std::string& zone) { + std::string filename(dir); + filename += "/"; + filename += zone; // ORC-110 std::lock_guard<std::mutex> timezone_lock(timezone_mutex); std::map<std::string, std::shared_ptr<Timezone> >::iterator itr = timezoneCache.find(filename); if (itr != timezoneCache.end()) { return *(itr->second).get(); } - timezoneCache[filename] = std::make_shared<LazyTimezone>(filename); + auto it = TZ_ALIASES.find(zone); Review Comment: This overhead occurs once per `zone` because we fill `timezoneCache` only one time and reuse it forever. -- 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. To unsubscribe, e-mail: issues-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org