Skip to content

Speed up input processing scripts #98

@wesleyjcole

Description

@wesleyjcole

Summary

Some of the input processing scripts can take a long time, which can slow down testing and debugging.

Here is a runtime profile from a run performed in May 2026 for USA_defaults on Kestrel (a model version run on my 2026 Dell laptop had a similar time proportion across scripts, but all runtimes were ~30-100% longer):

Input Processing File Time (s)
copy_files.py 21.1
mcs_sampler.py 0.0
aggregate_regions.py 45.1
hydcf.py 4.9
h2_storage.py 0.3
calc_financial_inputs.py 1.6
fuelcostprep.py 0.1
writecapdat.py 1.5
writesupplycurves.py 37.1
writedrshift.py 0.0
plantcostprep.py 0.2
climateprep.py 0.0
hourly_load.py 76.0
recf.py 369.8
WriteHintage.py 4.5
transmission.py 25.1
outage_rates.py 75.6
hourly_repperiods.py 970.7

recf.py and hourly_repperiods.py are the main candidates for speed up. It would be good to profile those scripts to see if/where there might be opportunity to speed them up.

Proposed Changes

Some ideas for speed ups are included in #92.

If someone wants, it would be neat to build a script profiling capability that could be turned on to profile scripts automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions