Commit 8227cf6
Optimize _handle_create_error to eliminate unnecessary intermediate list creation\n\n- Refactor _handle_create_error to return the failed_line directly instead of wrapping it in a list\n- Remove redundant list() call when creating failed line\n- Update caller to use append() instead of extend() for better performance\n- Eliminate unnecessary intermediate list creation for better efficiency\n- Maintain all existing functionality while improving performance\n\nFixes the inefficiency noted in code review where the function was creating\nan unnecessary intermediate list and the caller was using extend() instead of append().
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>1 parent 2421b4a commit 8227cf6
1 file changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | | - | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
| |||
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
453 | | - | |
454 | | - | |
455 | | - | |
| 452 | + | |
| 453 | + | |
456 | 454 | | |
457 | 455 | | |
458 | 456 | | |
| |||
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
| 510 | + | |
513 | 511 | | |
514 | 512 | | |
515 | 513 | | |
516 | 514 | | |
517 | | - | |
| 515 | + | |
518 | 516 | | |
519 | 517 | | |
520 | | - | |
| 518 | + | |
521 | 519 | | |
522 | 520 | | |
523 | 521 | | |
| |||
0 commit comments