Commit Graph

2 Commits

  • 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>
  • Initial commit
    Signed-off-by: Ilan Bigio <ilan@openai.com>