Skip to content

Parsing is substantially slower than I'd expect #36

@nex3

Description

@nex3

When presented with properties files that contain thousands of entries, this package can take multiple seconds to parse them. This is substantially slower than a naive line-by-line parse method, and slow enough to make this package infeasible for my use-case.

See this benchmark, which compares properties-reader to a naive solution using string splitting. Here's the output I get:

.read() x 23.15 ops/sec ±1.05% (42 runs sampled)
naive x 2,600 ops/sec ±0.89% (98 runs sampled)
Fastest is naive

I might expect a naive solution to be a bit faster because it needs fewer checks for complex cases like comments and headings, but being two orders of magnitude faster is very surprising.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions