-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Hey! We've been using ktfmt for our generated SDKs at Stainless. We've found the formatter can be slow sometimes due to the size of the SDKs we generate (the larger the API, the larger the generated SDK).
I decided to do some profiling and I found Parser.parse takes a significant amount of time (ktfmt-flamegraph.html.zip attached for running anthropic-sdk-java) because it's called four times per file.
Do you think it's possible to ensure each file gets parsed exactly once? I recognize it's not a trivial problem because subsequent transformations would somehow need to take into account edits from previous transformations, but seems like a worthwhile investment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed