Skip to content

Hocon.load takes exponential time to load with += seperator #89

@musiaht

Description

@musiaht

Encountering a problem with Hocon.load and Hocon.ConfigFactory.load_file; when loading a file with more than 5 '+=' to a key it will take exponentially longer with each concatenation.

For example, a file with the following will take more than 30 minutes to load.

asdf.s += 'asdf'
asdf.s += 'asdf.asd.asd.afs.asf.a.sf.asf.asf.asf.a.sf.'
asdf.s += 'asdf.qwe.qwe.q.we.qwe.qw'
asdf.s += 'asdf.q.weqwe.qwe.qwe.'
asdf.s += 'asdf.qweq.weq.e.qwe.'
asdf.s += 'asdfqeqweqwe.qwe'
asdf.s += 'asdf.asfd.asf.af'
asdf.s += 'asd.asdfasff'
asdf.s += 'asdf.asdfsadf'
asdf.s += 'asd.aaaaaf'
asdf.s += 'asd.fdsgwer.f'
asdf.s += 'asdf.lkjp.poiu.zsdf'
asdf.s += 'asdf.erwerwer.werwer'
asdf.s += 'asdf.llfllwelpwelr.sdf'
asdf.s += 'asdf.asdfasdf'
asdf.s += 'asdf.sdfsdfppowerwer'
asdf.s += 'asdf.ggggg'

It looks like we can get away with converting that into an array, but I am wondering if this can be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions