Skip to content

Diagnosing low performance #918

Open
@cpg314

Description

What steps did you take:

I have a fairly small ytt configuration, with 36 files and 1600 lines. Among these, 20 files are values (totaling 1100 lines).

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
YAML                            36             48            289           1618

The templates (which I unfortunately cannot share) do not do anything I would consider heavy. They just generate manifests for regular Kubernetes resources.

What happened:
It takes 3.9 seconds to generate the 5700 lines of output on a fairly beefy Lenovo P1 machine.

I tried to remove all values files and add them back one by one, and one can see the generation time dramatically increasing:

381ms 748µs 771ns
421ms 23µs 781ns
556ms 209µs 636ns
625ms 745µs 631ns
804ms 283µs 465ns
811ms 94µs 171ns
917ms 907µs 756ns
1sec 33ms 792µs 286ns
1sec 142ms 491µs 30ns
1sec 768ms 729µs 36ns
2sec 135ms 703µs 219ns
3sec 869ms 202µs 205ns

What did you expect:
With a fairly small configuration, I would expect the generation to be almost instantaneous.

Anything else you would like to add:
Is there a way to diagnose where ytt spends the generation time?
The --debug flag is generating a lot of lines that are difficult to inspect.

Environment:

  • ytt version (use ytt --version): 0.49.0
  • OS (e.g. from /etc/os-release): Manjaro Linux

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behaviordiscussionThis issue is not a bug or feature and a conversation is needed to find an appropriate resolution

    Type

    No type

    Projects

    • Status

      To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions