Skip to content

[RFC] Transforming Intl data from JSON to PHP #23545

@javiereguiluz

Description

@javiereguiluz
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.4

I was profiling the Symfony Demo app, and I realized that json_decode() took a lot of time to execute:

intl-data-json-decode

The reason is that Intl data is provided as JSON files (see https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Intl/Resources/data).

Would it make sense to transform that data into PHP (using var_export()) to avoid parsing it and to get free caching thanks to OPCache? By the way, Intl already provides a reader and writer of this data for PHP, so we could use it (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php).

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntlPerformanceRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions