Skip to content

Performance Investigation: Speed Issues in copy_template Function #187

@shahryarjb

Description

@shahryarjb

As we discussed on Discord, I’ve been looking into the speed issues with the copy_template function and have come across some of the following findings.

It’s worth mentioning, based on the timings I shared on Discord, that the slowdown isn’t caused by a single function in this process. Instead, there are several operations in different parts that individually take around 60 to 70 milliseconds.

The Igniter library takes around 200 to 400 milliseconds for a single file, which is great, especially if the script isn’t of a continuous type.

This issue mainly arises for use cases like mine, where it takes about 80 to 350–400 milliseconds per file, resulting in a total time > of around 32 seconds on a system with 16 GB of RAM and a 7700K CPU.

Tracking

  1. Igniter.create_new_file: {11, 56813, 0, 182955}
  2. As you see in this function we have 2 big number 56813 and 182955
  3. The second one is for maybe_format function
  4. Inside the format function you have these numbers {2876, 68006, 2662, 0, 108013, 1}
  5. After that inside this function with_evaled_configs you have 68002

All the function in this junction, each of them has 2 or 3 big number approximately!

Thank you in advance

Ref

  1. https://discord.com/channels/711271361523351632/1253324141491261472/1325842217088192532

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions