Skip to content

Trim down generated flat python to keep LoC under 1,000,000. #7

@hearnderek

Description

@hearnderek

Looks like my notes didn't save.
Basically python scripts and functions are limited to 1,000,000 lines of code. there is a PEP related to this.
In my profiling test I ran into this limit. Also importing takes longer when there are a ton of lines of code.

The basic idea behind this fix is to take the unrolled loops and convert them back into loops.

Should I do this when

  1. Within new object which walks the graph without executing it?
  2. creating the code?
  3. just before writing to file?
  4. just before importing?

My gut feeling is that the easier options are 2 and 3, but in the long term 1 would be the most maintainable since get_calc is quite bloated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions