Skip to content

Improve performance of the API returned by createTextWriterΒ #44036

@dmichon-msft

Description

@dmichon-msft

Suggestion

πŸ” Search Terms

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

  • performance
  • createTextWriter

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Based on the performance wins in #44031 / #43987, there may be opportunities to improve the performance of concatenating lots of short strings in the createTextWriter() API.

πŸ“ƒ Motivating Example

Compiler performance. Currently print takes substantially longer than parse, so anything to improve print time without sacrificing code maintainability is a worthwhile endeavor.

πŸ’» Use Cases

Compiler performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions