core-agent-ide/codex-cli/src
Yonatan Lavy 6d4c4b1bdd
refactor: improve performance of renderFilesToXml using Array.join (#127)
### Summary

Refactored the `renderFilesToXml` function to improve performance and
readability by replacing iterative string concatenation with
`Array.map().join()`.

### Changes

- Replaced the `for...of` loop with `files.map(...).join('')`
- Reduced number of string mutation operations
- Preserved the existing XML structure and CDATA safety

### Why

Using `join` avoids repeated string concatenation in loops, which can
improve performance, especially when rendering a large number of files.
It also results in more concise and idiomatic code.


I have read the CLA Document and I hereby sign the CLA
---

Let me know if this needs any adjustments!

Signed-off-by: yonatanlavy <yehonatanmind@gmail.com>
2025-04-16 16:14:57 -07:00
..
components Removes computeAutoApproval() and tightens up canAutoApprove() as the source of truth (#126) 2025-04-16 15:39:41 -07:00
hooks Initial commit 2025-04-16 12:56:08 -04:00
utils refactor: improve performance of renderFilesToXml using Array.join (#127) 2025-04-16 16:14:57 -07:00
app.tsx Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
approvals.ts Removes computeAutoApproval() and tightens up canAutoApprove() as the source of truth (#126) 2025-04-16 15:39:41 -07:00
cli.tsx dotenv support (#122) 2025-04-16 15:33:12 -07:00
cli_singlepass.tsx remove triaging labels section + avoid capturing exitOnCtrlC for full-context mode 2025-04-16 10:41:44 -07:00
format-command.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
parse-apply-patch.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
text-buffer.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
typings.d.ts Initial commit 2025-04-16 12:56:08 -04:00