dlang-community / configy

An automatic YAML to struct configuration parser for dlang
MIT License
3 stars 2 forks source link

High impact on compilation speed #61

Open CyberShadow opened 6 hours ago

CyberShadow commented 6 hours ago
import configy.read;

struct Config
{
}

void main()
{
    parseConfigFileSimple!Config("config.yaml");
}

The above program takes 3.5 seconds to compile on a Threadripper 3960X with DMD, which seems more than what would be reasonable to expect.

CyberShadow commented 6 hours ago

Seems like most of it is coming from D-YAML... would it be perhaps possible to use D-YAML via an opaque interface so that the implementation isn't imported when compiling programs that use configy?