Skip to content

Python Debugger - Very slow when parsing pyhocon file in python 3.12 (pydevd) #344

@samueldemir

Description

@samueldemir

When we try to read a configuration file that holds maybe includes, replacements etc. and when we run it normally the file can be parsed within 0,5s.

When we try the same code in the deubgger mode, then it needs more than 1 minute. As more and more the configs are growing the debug mode takes incredibly long.

I tried some lazy load mechanisms to adapt the "repr" but as soon as I need to access some config params, it takes again so long.
This is definitely related to the pycharm default debugger.

I tried to reproduce most of the parts with omegaconf or dynaconf. The debugging way is fast. So I think there are some internals in pyhocon that are raising these issues some where.

I did only this:
config = ConfigFactory.parse_file("...")

UPDATE 1:
When I do the same with python 3.9 and pyhocon 0.3.59 the python debugger runs again fast. So propapbly an issue regarding the library.

python 3.9 and all versions of pyhocon including 0.3.63 unning fast in debug mode. so it should be an issue with the python version..

UPDATE 2:
I tested pyhocon 0.3.63 on python 3.9 / 3.10 / 3.11. The debugger works perfectly.
Changing the same to python 3.12 the debugger does not work correctly

UPDATE §:
From pycharm 2026.1 you can set the debugger from pydevd to debugpy. With this change on local venv it runs fast also with python 3.12.
If you are using docker remote interpreter (which is great for spark stuff) it does not work. there are mapping problems regarding the file mountings etc that debugpy cannot see the files.

tested by:

  • remote python docker interpreter
  • local venv

Can anyone reproduce this issue? I tried it on 3 independent machines and all are giving same bad result.

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