You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/25 20:51:00 UTC

[jira] [Commented] (ORC-218) [C++] Cache timezone information in the library.

    [ https://issues.apache.org/jira/browse/ORC-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100758#comment-16100758 ] 

ASF GitHub Bot commented on ORC-218:
------------------------------------

GitHub user grundprinzip opened a pull request:

    https://github.com/apache/orc/pull/142

    [ORC-218] Cache timezone information in the library.

    Right now, for every lookup of a timezone, the library will go to
    disk and parse the timezone file. While the results are cached,
    doing these system calls should be avoided in environments with
    restricted system calls.
    
    This patch loads all the time zone files into the binary at
    build time and instead of accessing disk for the TZ
    information will simply load the buffer from memory. In addition,
    this allows the user to compile the library with a static
    timezone to be assumed for local use. This comes in handy to avoid
    yet another set of system calls to assume the local timezone.
    
    The following CMake flags control this feature:
    
      * EMBEDED_TZ_DB - disables this feature if set to OFF
      * STATIC_TZ=Val - sets a specific timezone

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/grundprinzip/orc orc218-tz

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/orc/pull/142.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #142
    
----
commit b87586d3b3b8892c15d04fe6019152deebbb8954
Author: Martin Grund <ma...@amazon.com>
Date:   2017-07-25T20:34:27Z

    [ORC-218] Cache timezone information in the library.
    
    Right now, for every lookup of a timezone, the library will go to
    disk and parse the timezone file. While the results are cached,
    doing these system calls should be avoided in environments with
    restricted system calls.
    
    This patch loads all the time zone files into the binary at
    build time and instead of accessing disk for the TZ
    information will simply load the buffer from memory. In addition,
    this allows the user to compile the library with a static
    timezone to be assumed for local use. This comes in handy to avoid
    yet another set of system calls to assume the local timezone.
    
    The following CMake flags control this feature:
    
      * EMBEDED_TZ_DB - disables this feature if set to OFF
      * STATIC_TZ=Val - sets a specific timezone

----


> [C++] Cache timezone information in the library.
> ------------------------------------------------
>
>                 Key: ORC-218
>                 URL: https://issues.apache.org/jira/browse/ORC-218
>             Project: ORC
>          Issue Type: Improvement
>            Reporter: Martin Grund
>
> Right now, for every lookup of a timezone, the library will go to disk and parse the timezone file. While the results are cached, doing these system calls should be avoided in environments with restricted system calls.
> I prepared a patch that will at build time load all the time zone files into the binary and instead of accessing disk for the TZ information will simply load the buffer from memory. In addition this allows the user to compile the library with a static timezone to be assumed for local use. This comes in handy to avoid yet another set of system calls to assume the local timezone.
> The feature can be controlled using the following CMake flags
> * NO_EMBEDED_TZ_DB - to turn it off, by default is on
> * STATIC_TZ=VAL - where val is a name of a timezone.
> I'll create a PR for code-review.
> Would be great if you could consider this patch.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)